- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2020 12:43 PM
Hello Jaspal,
Thanks for the quick reply,
When i am using the below script, number is getting populated in the "u_interaction" field, but i want sys_is to be populated, which is not getting populated. Below is the script i am using.
var number = current.trigger_id.sys_id;
current.u_interaction.setDisplayValue(number);
current.update();
Can you please rectify me if i am doing mistake anywhere in the above script.
Thanks & Regards,
S.Swaroop.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2020 12:47 PM
Try using below.
var number = current.trigger_id.sys_id;
gs.log('Sysid is ',number);
current.u_interaction=number;
current.update();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2020 12:54 PM
Hello Jaspal,
Still it was returning the "number" of the ticket, not populating with "sys_id".
Thanks & Regards,
S.Swaroop.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2020 12:57 PM
u_interaction is a reference field or is a string field? If reference try setting the value to a string filed it should set sys_id.
Since, for reference it will check for sys_id but will reflect that is used as the Display Value for the record.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2020 01:22 PM
Hi Swaroop,
Here you go. You don't need to call getDisplayValue() on trigger_id.
document_id itself holds the sys_id of the record. Please try below in your business rule and see how it goes. I am using this on Assessment Instance table for driving logic's. Hope this will help.
var display = current.trigger_id;
gs.addInfoMessage("SYS ID - " + display);
current.u_interaction = display;
current.update();
Please mark this accepted & helpful if it answered your question.
Thanks,
Sharjeel
Muhammad