I have created an object called Audit with the following attributes:
Action > Choices: Insert, Update, Delete, Viewed
Description
MadeBy
ModeOn
ObjectID
ObjectName
On each BO I have three rules (For BO Activity):
Audit_New
If Activity IS NEW Then
CREATE Audit WITH Audit.Action='Insert',Audit.Description=GET_CHANGES(Activity),Audit.MadeBy=LoggedInRegularUser.LoginName,Audit.ObjectName='Activity',Audit.ObjectID=Activity.ID
Audit_Changed
If Activity WAS CHANGED Then
CREATE Audit WITH Audit.Action='Update',Audit.Description=GET_CHANGES(Activity),Audit.MadeBy=LoggedInRegularUser.LoginName,Audit.ObjectName='Activity',Audit.ObjectID=Activity.ID
Audit_Delete
If Activity WAS CHANGED AND Activity.Status='Deleted' Then
CREATE Audit WITH Audit.Action='Deleted',Audit.Description=GET_CHANGES(Activity),Audit.MadeBy=LoggedInRegularUser.LoginName,Audit.ObjectName='Activity',Audit.ObjectID=Activity.ID
I now want to add a button to the activity form to allow the user to see the audit for the current object.
How do I do this?
My first thoughts where to:
Add an operation for the form called 'Audit' which runs a process called 'aud_display' which does the following:
FIND Audit WHERE Audit.ObjectID=?'Object ID' ORDER BY Audit.MadeOn
VIEW Audit
I put in the form operation, Process input 'Address' with value 'Address.ID'
But this dosn't seem to do anything and leaves a box saying 'Executing'
How have other users implemented displaying the audit details for an object?
Displaying audit details for an object ID
Displaying audit details for an object ID
Using 4.8 Build 1266
ok, if anyone is interested this is how I managed to get an audit search going on a business object form.
For each BO (say Address)
1. create a query (aud_Search_Address)
---in the WHERE put Audit.ObjectID=Address.ID
---order by Address.MadeOn.
---In Display results I display Action, MadeOn, ObjectName, Description (Expanded checked).
---The only operation I have is 'View'
2. On the BO add to your form an 'Operation invoked from the form'
---Add 'Auditing', Operation type 'Run Query'
---select aud_Search_Address
If anyone has an easire way to do this let me know
For each BO (say Address)
1. create a query (aud_Search_Address)
---in the WHERE put Audit.ObjectID=Address.ID
---order by Address.MadeOn.
---In Display results I display Action, MadeOn, ObjectName, Description (Expanded checked).
---The only operation I have is 'View'
2. On the BO add to your form an 'Operation invoked from the form'
---Add 'Auditing', Operation type 'Run Query'
---select aud_Search_Address
If anyone has an easire way to do this let me know
Using 4.8 Build 1266