REQ and RITM Requested for values are different(In Requested record related list) ?

raj99918
Tera Contributor

Hi Team,

 

I have one custom catalog form called "abc", and having one variable "Requested for(u_requested_for)" while submitting the form I have changed the Requested for to another name "Rahul" Opened by name is "Jessy" but While opening my Request record there its showing the changed "Requested for" -- Rahul, but in the releated list RITM still in Requested for showing as opened by name only (Jessy) , interesting part is when am opening this RITM there its showing the correct Requested for i.e changed value "Rahul"

 

Note: I have wrote the script in workflow runscript inorder to the fetch that catalog form changed requested for to RITM record below are mt script.

var req = new GlideRecord('sc_request');
req.addQuery('sys_id',current.request.sys_id);
req.query();
if(req.next()){

req.requested_for = current.variables.u_requested_for.sys_id;
req.update();
}

 

3 REPLIES 3

Anil Lande
Kilo Patron

Hi,

Make sure you are setting requested for on Both RITM and REQ.

var req = new GlideRecord('sc_request');
req.addQuery('sys_id',current.request.sys_id);
req.query();
if(req.next()){
req.requested_for = current.variables.u_requested_for.sys_id;
req.update();
}
current.requested_for = current.variables.u_requested_for.sys_id;  // additional line to update RITM requested for

 

Check which field is being shown on RITM form view? Is it dot walked from REQ 

Also check List Layout, the field must be from RITM , not dot walked.

 

We have requested for field on both RITM and REQ from PARIS onward. Prior to that it was only on REQ (sc_request) and was used on RITM using dot walk.

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

Hi @Anil Lande 

 

Thanks for the reply on both RITM and REQ have the same requested for but I dont know why its showing a different Requested for in REQ related list for RITM requested for but when I try open the same record RITM its showing correct value

This is strange. have tried after adding additional line?

current.requested_for = current.variables.u_requested_for.sys_id;  // additional line to update RITM requested for

If this is same field then it will not show different values in List and Form view. 

can you please share screenshots? and cross check that fields are not dot walked in any of the view?

 

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande