How to get audit logs for a custom column.

book

Article ID: 14742

calendar_today

Updated On:

Products

CA Service Management - Service Desk Manager CA Service Desk Manager

Issue/Introduction

How to set up to get Audit Logs for a custom field?

Environment

Release: 14.1 and 17.X
Component: USRD

Resolution

In order to record audit logs when a custom field is updated, please follow the below steps. In this example, we use a custom column, "ztest01" added to the CR Object.

  1. Launch Web Screen Painter and log into it using Service Desk Manager (SDM) Administrator account and launch Schema Designer.

  2. In the Schema Designer, select the custom column, for example, "ztest01" and open 'Advanced' tab.

  3. In the 'site-defined UI_INFO' field, type "AUDITLOG".



  4. Go to 'File' > 'Save and Publish' and close Schema Designer and Web Screen Painter.

  5. Stop the Service Desk Manager service and open the Command Prompt.

  6. Run pdm_publish to take effect the change in Schema Designer.

  7. Start the SDM service and log into SDM using SDM Administrator.

  8. Open 'Administration' tab and go to 'Notifications' > 'Activity Notifications'.


  9. Click on <Create New> button and create a new Activity Association for ztest01 column as per the following example. Ensure to turn on the "Log Me" check box.



  10. Go to 'Options Manager' > 'Audit Log' and install the audit log options, "audit_upd" and "audit_ins", and restarted the SDM service.



  11. Created a file auditlog_site.mod with the following content and store it under ..\site\mods folder.

    OBJECT cr {
     TRIGGERS {
      // log field changes for custom attributes
      POST_CI audit_fields_site(persistent_id, audit_userid, ref_num, CHANGED_ONLY, ztest01) 51
       FILTER( EVENT("UPDATE(NX_AUDIT_UPD)") );
     };
    };

  12. Save it and restart the SDM service to take effect the changes.

Additional Information

Audit Log List

Attachments