How do I override a field property in a business object?


Author
Message
Cory Cookson
Cory Cookson
StrataFrame Novice (86 reputation)StrataFrame Novice (86 reputation)StrataFrame Novice (86 reputation)StrataFrame Novice (86 reputation)StrataFrame Novice (86 reputation)StrataFrame Novice (86 reputation)StrataFrame Novice (86 reputation)StrataFrame Novice (86 reputation)StrataFrame Novice (86 reputation)
Group: Forum Members
Posts: 30, Visits: 416
I would like to override a field property in an SF business object so that I can effect changes to the data before it is saved back to the database.

I tried copying out the field property generated from the business object mapping tool, placing it in the business object partial class where you add data retreival methods so it wouldn't be overwritten if the object is regend and applying the new and override key words but it tells me that it is already in use in the object (which it is of course, I just want to override it)

Any help you can offer me woould be greatly appreciated.

Thanks,

Cory

Cory Cookson

Software Developer

Occupational Health Research

Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.4K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
You might just want to provide your own custom code for any properties like this. In the BO Mapper, for the properties that you need to do something custom, check the "custom code" check box. Then put your custom code into the text box that is on the Custom Code tab (which appears when you click custom code).



I'd just copy in the existing property code (or your already customized code...without overrides key words). This way, when you rebuild the BO, you're custom code just gets inserted in the designer file. BigGrin
Cory Cookson
Cory Cookson
StrataFrame Novice (86 reputation)StrataFrame Novice (86 reputation)StrataFrame Novice (86 reputation)StrataFrame Novice (86 reputation)StrataFrame Novice (86 reputation)StrataFrame Novice (86 reputation)StrataFrame Novice (86 reputation)StrataFrame Novice (86 reputation)StrataFrame Novice (86 reputation)
Group: Forum Members
Posts: 30, Visits: 416
Excellent answer!  Looks like this will work for me.

Thanks for the quick response!

Cory Cookson

Software Developer

Occupational Health Research

Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.4K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Glad it helped! BigGrin
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search