- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2017 12:41 PM
We have odd minor issue in this group like this,
Notice that in red circle was recently updated by me but I never touch that group. I was wondering if that was cause by daily schedule job script created by me that run on [sys_user_group] table to update some value in specific fields that cause trigger on audit update? If so then will use gr.setWorkflow(false); in script work to prevent that audit trail updated and updated by?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2017 01:13 PM
Hi Bradley,
It is very likely that your scheduled job is doing this. Rather than setWorkflow(false), try autoSysFields(false).
setWorkflow() controls whether business rules and workflows will be triggered when the record is updated.
autoSysFields() determines if the times, counts, (and I believe updated by) are updated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2017 01:13 PM
Are you groups populated from LDAP? Or are there daily jobs that update groups? If so then a scheduled job could be the culprit. In the scheduled job definition there is a "run as" field that you can populate with a user.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2017 01:19 PM
It a daily scheduled job I created only to update numbers in [sys_user_group] on 2 fields "Total of Members" and "Total of Active Member". It is run as "me" in default which is probably why my username show up alot in Updated By on group table.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2017 01:21 PM
If you want to keep those fields up to date, I recommend using a business rule that watches for changes on sys_user_grmember. That way as records added/deleted to that many-to-many table, you can keep the counters on the group up to date in real time rather than relying on a nightly script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2017 01:22 PM
When you create a scheduled job your ID gets plugged in automatically. You could switch it to another user instead so you know its a background job updating the record. I am hesitant to suggest that you use gr.autoSysFields(false) because you will not know when the groups were updated for audit history purposes unless you truly don't care about the updates done by the scheduled job.