Why Requested For is auto populating incorrectly in Request summary and RITM record?

Ankita28
Giga Contributor

Hi Community,

I created a request for Aaron Shelly from portal and submitted the form.

After Submitting the form,in Request Summary showing Requested For as incorrect user name.

In platform,for REQ Requested For is showing correct.

 

but for RITM,its showing incorrect user name.

 

Could anybody please help with this issue?

Thanks,

Ankita

 

19 REPLIES 19

BALAJI40
Mega Sage

Hi,

Did you check, how the requested for field is getting populated? (check the workflow and business rules)

Also, why Request field is showing as the user instead of the request number,

Hi Balaji,

In workflow,we have run script to set the requested for value.However when user navigate to item that value is auto populating but when user changes requested for value and submits the form.Why still it's showing requestor name instead of Requested by name.

Also I checked no business rule is there.

 

Thanks,

Ankita Kolhe

Upender Kumar
Mega Sage

Check the field mapping of variable to the requested item table field in BR/workflow.

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

requested_for field on REQ gets defaulted to logged in user.

If you are submitting then it would show your name

If you wish to update the requested_for field of REQ with variable value then you need to use after insert BR on RITM table

BR: After Insert on sc_req_item

Condition: // give the item name here

current.cat_item.name == 'Order an iPhone'

Script:

(function executeRule(current, previous /*null when async*/) {

	// Add your code here
	var req = current.request.getRefRecord();
	req.requested_for = current.variables.requested_for; // give variable name here
	req.update();

})(current, previous);

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader