Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Create request through import set

aagman4
Tera Contributor

Whenever a new user is added to 'User' table, raise a request to deliver laptop for the new user through import set.

 

I tried this OnBefore Transform Script -

var cart = new Cart();
var item = cart.addItem('04b7e94b4f7b4200086eeed18110c7fd');

var rc = cart.placeOrder();

 

the issue is - it is creating request for all users, it should create request for new users only and in requested by field, the name of that new user should be populated.

 

Note - I am using Load Data(excel file) and an existing import set table and transform map.

 

Please help me with this.

 

Thanks!

5 REPLIES 5

See the suggestions here

https://www.servicenow.com/community/now-platform-forum/how-to-set-requested-for-in-ritm-using-cart-...

 

I still stand by my other reply that you should just use flow designer instead.