Business Object's FieldNames Enumeration v. Custom Field Properties


Author
Message
Alex Luyando
Alex Luyando
StrataFrame User (210 reputation)StrataFrame User (210 reputation)StrataFrame User (210 reputation)StrataFrame User (210 reputation)StrataFrame User (210 reputation)StrataFrame User (210 reputation)StrataFrame User (210 reputation)StrataFrame User (210 reputation)StrataFrame User (210 reputation)
Group: StrataFrame Users
Posts: 112, Visits: 1.2K
Thanks Edhy and Trent (and sorry I didn't reply earlier to your reply, Edhy).



I am using a single event to handle field changes, and need to test if the event was raised by changes to any of several business object fields in order to call/not call a method for additional data processing.



Most of the fields I am testing are fields created by the BOM so I test using the FieldName. enumerations v. e.FieldChanged. For the two Custom Field Properties I need to hard-code the test for the CFPs' fieldnames (not a biggie) and use the CFPs' SET( ) to trigger the call to the same method that the FieldChanged( ) handles for the BOM fields. It just means for two paths for maintenance if column/field names are changed in the future--one for BOM fields, another for CFPs. Don't love it, but it's ain't the worse thing I've seen.



Overall it's all good!

________________

_____/ Regards,

____/ al


________________
_____/ Regards,
____/ al
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Edhy is correct in that they will not be part of that event as they are, as you mentioned, custom. So the BO in this regard doesn't reflect over any CFPs (as this would be slow). So you are better off creating a single method that you call or even raise the event your self as these events are created on the BO. Most likely you will just want to create another method to funnel all calls through.



For example, in the Set of the CFP, you would call your custom method / event. This is ultimately all that the field events do.
Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Alex,

Custom Field Properties can not be part of the BO.FieldNames enumerations because the BOM does not know anything about them, all this is hard coded by the BOM in the bo.designer file.



Now can you explain in more detail what do you want to accomplish?



In my case CFPs are read only and therefor will not trigger any Changed event, what is the purpose of your CFPs?

Edhy Rijo

Alex Luyando
Alex Luyando
StrataFrame User (210 reputation)StrataFrame User (210 reputation)StrataFrame User (210 reputation)StrataFrame User (210 reputation)StrataFrame User (210 reputation)StrataFrame User (210 reputation)StrataFrame User (210 reputation)StrataFrame User (210 reputation)StrataFrame User (210 reputation)
Group: StrataFrame Users
Posts: 112, Visits: 1.2K
Hi all -



I have a few Custom Field Properties, and am using a single FieldPropertyChanged() event. I wanted to test the incoming e parameter with something like...





if (e.FieldChanged == boITransactions.boITransactionsFieldNames.Override_Flag)

....





It's looking to me, however, like CFPs are not part of the enumerated business object fields? Is that correct?



TIA


________________
_____/ Regards,
____/ al
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