- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2018 03:31 AM
Hi All,
I would like to get few solutions for my problem related to parent & child workflow.
I have created a custom table which extends 'sc_request' table & record producer form.
Once the user submits the form it will create entry in that custom table & it will attach to the workflow which I have created for that table.
In that workflow I have attached another workflow (sub workflow) which will create Requested Item.
The problem here is, my attached workflow is not creating the RITM. But it seems its alone working fine. When I include that workflow in my custom table workflow it's not working (not creating RITM).
My custom table is an extended table of sc_request & it has 'Requested Item' Related List.
What is the problem here? What should I do?
Please suggest/help me.
Regards,
SNOW
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2018 03:09 AM
I handled it by adding the following lines in Run Script
var catItemId = "SYSID"; //sys_id of an item needs to be created as a new RITM
var requestId = current.sys_id;
var helper = new GlideappCalculationHelper();
helper.addItemToExistingRequest(requestId, catItemId, "1");

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-13-2018 03:50 AM
You can use below script to generate Request. Change the Catalog item sys_id ,variable name and variable values.
var cartId = GlideGuid.generate(null);
var cart = new Cart(cartId);
var item = cart.addItem('e46305bdc0a8010a00645e608031eb0f');
cart.setVariable(item,'os','Linux Red Hat');
var rc = cart.placeOrder();
gs.addInfoMessage(rc.number);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2018 03:09 AM
I handled it by adding the following lines in Run Script
var catItemId = "SYSID"; //sys_id of an item needs to be created as a new RITM
var requestId = current.sys_id;
var helper = new GlideappCalculationHelper();
helper.addItemToExistingRequest(requestId, catItemId, "1");