- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2023 06:58 AM
Hello;
For a business need, I need to modify the field "Requested for" of RITMs by script.
I did the following test in a background script:
var grRITM = new GlideRecord('sc_req_item');
grRITM.get('<sys_id of the RITM>');
grRITM.setValue('requested_for','<sys_id of the user>');
grRITM.update();
- On my PDI, it works fine, the field is being updated;
- On my business instance, field is not updated.
Although there is a comment added mentioning it was updated:
Note: If I modify the value of the field manually, it works. (meaning after saving, the new value is displayed).
I suppose this is due to a rule in my business instance, I looked for "requested_for" in Business Rules but I did not find one that would prevent to update this field.
I wanted to ask where I could look / what should I be searching for, to find out what is causing me this issue ?
Thank you very much in advance for your support !
Kr,
Sylvain
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2023 02:53 AM
Yeah that is what i am saying it is the field coming from sc_request and not a field directly on ritm table
var grRITM = new GlideRecord('sc_request');
grRITM.get('sys_id_of_request'); // you can get this from request field of ritm
grRITM.requested_for='sys_id of the user';
grRITM.update();
OR
Bring the requested for field of RITM on the form.
Please mark my answer as correct based on Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2023 02:53 AM
Yeah that is what i am saying it is the field coming from sc_request and not a field directly on ritm table
var grRITM = new GlideRecord('sc_request');
grRITM.get('sys_id_of_request'); // you can get this from request field of ritm
grRITM.requested_for='sys_id of the user';
grRITM.update();
OR
Bring the requested for field of RITM on the form.
Please mark my answer as correct based on Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2023 02:59 AM
Oh ok !
This field is from the REQ...
Thank you very much for your help ! Problem solved !
Have a nice day !
Kr,
Sylvain