on 2017 Jul 18 9:58 AM
Hi All,
I'm trying to read the ChangeHistory for Contacts when the Email address(on header) is changed using the Standard BOs BusinessPartner and BusinessPartnerRelationship.
I've had a look at ChangeHistory.Read in C4C Cloud application Studio example and Event-BeforeSave ABSL - access to UUID but unable to read the the old and new values of the email address.
Code written in Before Save event of BusinessPartner.xbo is:
var UUID = this.GetFirst().UUID;
var change =
ChangeHistory.Read("AP.FO.BusinessPartner.Global:BusinessPartner" ,UUID );
Similar code in BeforeSave event of BusinessPartnerRelationship.xbo is:
var UUID = this.GetFirst().UUID;
var change =
ChangeHistory.Read("AP.FO.BusinessPartnerRelationship.Global:BusinessPartnerRelationship" , UUID);
Is anyone able to guide me please?
Best Regards,
Preethi.
Request clarification before answering.
Hello Preethi,
Did you verify if there are some values for the ChangeHistory like within the normal UI?
Bye,
. Horst
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Horst,
Maybe some details on the requirements may help - If the Name/Email address/ Account linked with this Contact changes, we need to send some details to an external system via a web service.Also, is BeforeSave the best event to capture values from ChangeHistory? I see changes made as part of Change1 is retried in the BeforeSave event when I make Change2.
Best Regards,
Preethi.
Hi Horst,
I am looking for the Email element on the Header of a Contact. The Path is AP/FO/BusinessPartner/Global-Root-.CurrentDefaultIsContactPersonFor-.BusinessPartnerRelationship-.ContactPerson-.ContactPersonWorkplaceAddressInformation-.ContactPersonWorkplaceAddress-.DefaultEMail-~URI-~content . Hope this is what you're looking for.
Thanks confirming about the BeforeSave event.
Best Regards,
Preethi Santhanam
User | Count |
---|---|
84 | |
12 | |
9 | |
8 | |
8 | |
5 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.