Advanced Audit Trail - Object Code from an Association

0
HiI have implemented the AAT within my application, however when searching for a particular record within the menu for a particular entity I am having issues.Entity A has CaseID which I am using as the Object Code for this entity but I would also like to use it for Entity B.Multiple Entity B records can exist for Entity A and I would like to be able to see the audit trail for all of them by searching for the CaseID. I can search for the Entity itself fine but currently don't have an efficent way to filter for specific records.Is this possible and if so how would I set up the Argument for parameter 'ObjectCodeAttributeName' when creating the Snapshot.ThanksGrant
asked
1 answers
1

Hi Grant,

For the ObjectCodeAttributeName, you need to provide an attribute that belongs to the entity being snapshotted. You can't directly use an attribute from the associated Entity A through the association.


For example, if you have:


Entity A

  • CaseID

Entity B

  • EntityA association → Entity A


and you want to search all Entity B audit records using the same CaseID, I would recommend adding a CaseID attribute to Entity B and keeping it synchronized with Entity A's CaseID. Then configure that Entity B attribute as the ObjectCodeAttributeName when creating the snapshot.


This gives each Entity B snapshot the same CaseID, so you can search the audit trail using that value and find all related Entity B records.


The documentation describes the object-code search as an exact-match search, and the snapshot configuration expects an attribute value rather than an association itself.


If you don't want to duplicate the CaseID, another option would be to use the associated Entity A's Object Code/GUID and build a custom search around the association or use diect association to store the GUID in Entity B, but for your requirement, keeping a dedicated CaseID on Entity B would be the simpler approach and enough.


Kindly mark this as the accepted answer if it helps.

answered