When right-clicked on a userfield in lmghr, it displays two options (Show History and Show Pending changes). Upon selection, Show History displays a log with dates. What Business Class or table is the log being written to?
Thank you
Are you on ST or MT?
ST
That is from the Audit Log and it's stored as a blob (xml format) right on the record itself.
If possible , would appreciate any test example to get me started?
Hi Patrick,
On ST it is stored as blobs.
This explanation by Andy.tarver may help.
I am on MT so cannot search for the tables.
https://community.infor.com/infor-developers/f/landmark-development/14028/vendor-audit-list-landmark-table-extract/39662#39662
The audit log is one of the implicit fields defined on each business class (at least those that don't disable auditing). You can access it in LPL (or via a Landmark web service call or via ISD, etc.) — security permitting of course — as BusinessClass_AuditLog (i.e., Employee_AuditLog for the Employee business class).
It is a series of XML entries, but not directly parseable as a single XML document unless you only have exactly one audit log entry.
We had a use case where we needed to create a derived field that would return the timestamp of the last time a particular field on a particular business class was updated. We solved it with the following pair of derived fields on the FSM Vendor business class:
AriAuditLogXML is a DerivedField type is XMLDocument return ("<AuditLog>" + Vendor_AuditLog + "</AuditLog>")AriACHPrenotificationLastChanged is a DerivedField type is TimeStamp return (AriAuditLogXML select "(/AuditLog/entry[field[@name='ACHPrenotification']][@timestamp])[last()]/@timestamp")
The first derived field turns the audit log into a single well formed XML document. The second used the LPL select type operator and an XPath expression to return the timestamp of the last audit entry where the ACHPrenotification field was modified.
ACHPrenotification
Michael, I really like the solution vs having to loop through Audit records which is what I'm currently doing. However, having issues when there is an audit log correction made to the audit log. A "correction" entry gets put outside of the <entry> node and having an issue being able to identify when this exists related directly to a specific action/entry vs others. Here's the XML with the correction entry italicized. Any thoughts?<entry timestamp="2022081723094791" actor="XXXXXXX" authenticatedactor="XXXXXXX" ip="[XXXXXXXXXXXXX]" effective="20220802" action="Terminate" type="update" s="HCMEmployeeActionRequestTerminate" r="DEP DISMISS" actionrequest="f79fc6e5-4180-4c00-0000-0a3462fbbf7b" id="a2cd86e5-4180-8000-0000-adfd62fbbee6"><field name="TerminationNoticeDate" t="5"><ov><![CDATA[00000000]]></ov><nv><![CDATA[20220817]]></nv></field><field name="TerminationDate" t="5"><ov><![CDATA[00000000]]></ov><nv><![CDATA[20220802]]></nv></field><c><![CDATA[This is a test comment entered in Terminate action comment... cmd]]></c></entry><correction timestamp="2022081816075691" actor="XXXXXXX" ip="[XXXXXXXXXXXXX]" action="ChangeEffectiveDate" type="correction" id="c6d4da8d-4180-8000-0000-012d62fe4c96" tid="c6d4da8d-4180-8000-0000-012d62fe4c96" ne="20220803" or="a2cd86e5-4180-8000-0000-adfd62fbbee6"/>