How to creat request item from Transform map
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2020 04:48 AM
I have created an transform and I choose the target table as "sc_target" and I have created the onBefor transform map script as below
var cart = new Cart();
var item = cart.addItem('10dacbc1db3b6300bdb98edf4b9619ee');
//Set Variables in your Cart Item
var cartmsg = "Import Set: " + source.sys_import_set.table_name +', Datasource:'+ source.sys_import_set.data_source;
cart.setVariable(item,'pipeline',current.variables. level_of_access);
var rc = cart.placeOrder();
when I run transform map it's creating only sc_request but it's not creating sc_req_item.
So kindly help us how to create sc_req_item via transform map?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2020 11:03 PM
used var rc = cart.placeOrder(); but no luck ritm is not created.
\
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2020 11:53 PM
Hi,
can you try running this in background script?
Do you have 2 step checkout as true in system property?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2020 12:29 AM
Hi,
As said by shruti what does current.variables mean
Since you are having the value coming from import set table; should it not be from one of the import set table field
cart.setVariable(item,'pipeline', source.level_of_access);
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2020 10:25 PM
Is there any update on this? Is this question resolved or you need some more assistance.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2020 12:42 AM
Hope you are doing good.
Let me know if I have answered your question.
If so, please mark appropriate response as correct & helpful so that this thread can be closed and others can be benefited by this.
If not, please let us know if you need some more assistance.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader