fiogf49gjkf0d Hi,
Does anyone have any code to get the underlying field name from the database for a property? I.e. if ACCOUNT.ACCOUNT has a property of AccountName in the Account entity, is there any way of finding out that the underlying field is called 'ACCOUNT'. Yes I know that shouldn't be necessary but I have some configurable auditing of fields to a table that allows changes to be rejected or accepted. The properties that are audited can be selected dynamically in an interface by the user. I can get all the properties for an entity by using system.reflection and display them. This isn't a problem. However using Sage.Platform.ChangeManagement is not always picking up changes when changes occur. I need to use this in an onbeforeupdate event to log changes to the audit table. Because this isn't working I need to go to the database to get the current value vs the new value as I need to log the 'old' vs' 'new' value to my audit table. I don't really want to have to hard code the underlying field names if I can help it.
Sorry if that was a bit long-winded. Just trying to trying to dodge questions about why I'm not using the property itself and going through the entity model! I really need to know the underlying field name!
Doesn't matter so much about the table name. Happy to hard-code that and in most instances this is the same as the Entity name anyway.
Cheers
Daniel |