Setting Requested For - Using Import/Transform Map issue

angel7170
Tera Contributor

Hi - I have a requirement to create bulk requests for users using an excel file. To achieve that I have created a data source and transform map. 

The Excel template includes fields like

Requested For

Variable 1

Variable 2

Variable 3

 

The Transform map is using the Cart API as described in the post here: https://www.servicenow.com/community/developer-forum/submit-catalog-request-from-transform-script/m-...

 

Transform map target table is : sc_req_item

 

Everything seems to be working fine except, the "requested_for" is setting to the individual loading the data import in this case it is under my account rather than using the field in the excel. I want the "Requested For" for the REQ and the RITM to be set based on the excel source field. 

 

How can I achieve that?

 Please assist

 

2 REPLIES 2

Kieran Anson
Kilo Patron

The Cart API referenced in your link is deprecated, CartJS is the correct solution to be used and supports setting te requested for to a specific user

Medi C
Giga Sage

@angel7170 

Could you please use

var cart = new sn_sc.CartJS();

 
More details:

https://www.servicenow.com/community/developer-articles/understanding-sn-sc-cartjs-in-servicenow-its...


If you found this helpful, please hit the thumbs-up button and mark as correct. That helps others find their solutions.