Multiple RITMs for the same request
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-26-2017 07:30 PM
Hi Community,
Is there any ways to have multiple multiple RITMs depending on Quantity selected? I need run each RITM workflow individually instead of one workflow for all requested items.
Seems like using Add cart capability, i can add same item multiple times and once cart is placed, it created multiple items and that what I wanted to do, but from the user perspective that could be cumbersome to click the "Add to Cart" button 10 times to add to cart (If user need 10 items)
Any help will be much appreciated,
Thanks
Ak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2017 04:06 AM
Hi Lars,
I tried with your code for creating multiple ritm's . However , workflow is not getting attached to the last ritm which is created.
Can you please let me know what would be the reason.
Thanks,
Sangeetha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2017 11:22 PM
Hi
Its not an issue that I have experienced so I wouldn't know what could cause this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2017 05:04 AM
Hi Sangeetha,
Can you paste the script you are using and the conditions when and from where it is being triggered?
Regards,
Shilpa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2017 06:03 AM
Hi Sha,
Attached the script am using. I am calling the script include from the RITM workflow.
Workflow is getting attached , but Show Workflow is not showing on the last RITM. We have approvals on the Request . Is there any way we can create all the RITM's before approval. Currently , one ritm is getting created before first approval and the other ritm's after approval.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2017 09:06 AM
Hi Sangeetha,
I am not very clear on the logic you are applying, guessing at any time you want 'updateVariable' to run twice?
I doubt if the below given code is working, as context looks for object and not sys_id of ritm as per my understanding try passing object of ritm instead of grRITM.sys_id...
var grWf = new GlideRecord('wf_context');
if(!grWf.get('id', grRITM.sys_id)) {
var wf = new Workflow();
var wfId = wf.getWorkflowFromName("Access Request PoC Workflow");
var context = wf.startFlow(wfId, grRITM, 'insert', '');
if (context != null)
current.context = context.sys_id;