Jump to content

Recommended Posts

Hello,

I'm a bit frustrated trying to add additional fields to audit logging for the cnt object. It looks like the pre-made trigger is defined in audlog.mod (bofcfg\majic). Basically what I did was copy that trigger and changed around what fields are passed to the "audit_fields" function (see below). So where I'm running into a wall is calling the function. When I add my code I get a log error saying the duplicate trigger definition will be ignored. I can't copy the function because it's encrypted so not really sure what to do. Does anybody know the correct syntax for modifying a pre-defined trigger? The only two options I see are 1. write my own spel to add the rows 2. edit the bopcfg copy. Neither sounds like a good idea =)

MODIFY cnt POST_CI audit_fields (last_name, first_name, middle_name, userid, phone_number, organization, admin_org, notes,
                                email_address, contact_num, zdivision, zemployer_id, zposition_id)
50 FILTER (EVENT("INSERT(NX_AUDIT_INS) UPDATE(NX_AUDIT_UPD) DELETE(NX_AUDIT_DEL)"));

Link to comment
Share on other sites

Unfortunately, I don't know a third option. I would prefer changing bopcfg/majic/audlog.mod. Sure, you must always check if a patch delivers any change to that file. But you don't have to reinvent the wheel by writing your own trigger. It's just my personal favorite.

Link to comment
Share on other sites

Hi shadowbreeze,

to my knowledge, these predefined triggers are only available for the factories cr, chg, iss, wf, iss_wf and KD.

Unfortunetaly not for cnt.

Anyway, good hint ... I forgot, that these triggers/functions are there ....

Link to comment
Share on other sites

  • 1 year later...

i know its been awhile on this post, but thought the information was important to search on and for.

As per the update I understand

that you would like to enable auditing for Contact updates. Out of

the box when ever a contact is inserted this information is logged but no

updates are logged.In order to track these changes you would need to

customize the file audlog_site.mod file (bopcfg/majic).You would need to

copy ittosite/mods/majic (customize it) and recycle the service.

You have a sample file also under

<installdir>\samples\call_mgt\audlog_site.mod, you have the below section

// Add to Contact object.

OBJECT cnt {

TRIGGERS {

// log field changes for custom attributes

POST_CI audit_fields_site(persistent_id, audit_userid,

combo_name,attr, attr, ...) 51

FILTER( EVENT("UPDATE(NX_AUDIT_UPD)") );

you need to replace the "attr"s with the attributes on the contact detail

that you want to audit. Any number of attributes can be added here for the

contact detail.

The audit_site.mod file can be customized like any other mod file, there are

no specific rules for this file.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...