RITM | OnChange client script from Requested for OOB field

Nuno Oliveira
Mega Guru

Hi there,

 

I have this requirement to change the location from a requested item when the requested for changes and I have created a on change client script with the requested for field as a trigger, however it doesn't work, don't even run.

And I noticed that the OOB field is a dot-walking field, so probably this is the cause of that isn't working.

Do you any idea how I can achieve this? With changing the field

 

Thanks in advance.

 

Best regards 

5 REPLIES 5

The only possible solution is to set the location on server level by writing a business rule on request table and the trigger should be "Requested For changes". Write a script which will fetch the RITM record and update the location. 

 

Sample Code : 

var RITM  = new GlideRecord('sc_req_item');
RITM.addQuery('request',current.sys_id);
RITM.query();
while(RITM.next())
{
RITM.location = ""; //your location logic
RITM.update();
}