Business Rule - Updated by Field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2016 01:48 PM
Hi Guys.
I have a small problem with the Updated by field.
My company has implemented a single sign on, and we had to update the user id field to a unique reference number for our company.
I think the best way would be to implement a business rule for when the updated by field meets the patern to, but I am unable to find the correct field.
Ideally I would like that field to populate the name of the user that is updating the incident form.
Anyone has an idea how the script should look ? (I am quite neewbe in SN...no it experiance)
Thanks in advance
Matt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-10-2016 02:15 PM
Hi matt,
I kind of depends. If you only will use it on incidents, I would put it there. But if youre going to use it in other types that extends from task, i would put it on task table instead. Then you dont have to build it for each type.
Remember thou that much comes from task, but not everything
Let me know if my explaination wasnt good enough
//Göran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2017 03:27 AM
Sorry to resurrect an old thread but i'm just wondering if you can advise on the script that would be required to set the updated_by field based on the content of the sys_updated_by field?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-29-2017 05:38 AM
In case anyone else is wondering, the following seems to work in a before insert and update business rule
var gr = new GlideRecord('sys_user');
if (gr.get('user_name', current.sys_updated_by)){
current.u_updated_by = gr.sys_id;
}