Access variable in RITM from Record producer flow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Dear community,
Is it possible to bring the variables of my form to the RITM using a record producer ?
I need to create CASE + Service Request
I decided to create case from record producer and use a flow to create SR but I can't see the variables like this :
Any suggestions or other way to have case + sr creation best practice ?
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hi @gdo ,
I tried your problem in my PDI and it works for me please check below steps
In your record producer add below script
var cartId = GlideGuid.generate(null);
var cart = new Cart(cartId); // core Cart server API
var cartItemId = cart.addItem('9583869893ed7a189305f520ed03d666'); // returns cart item id
cart.setVariable(cartItemId, 'description', 'Issue from API');
var result = cart.placeOrder(); // result often contains request info / ids
gs.info('placeOrder result: ' + JSON.stringify(result));
My Variable
Result
Once I submit it
Target record got created
Also RITM created
Please mark my answer correct and helpful if this works for you
Thanks and Regards,
Sarthak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
34m ago
Variable editor on RITM will only show variables if your current RITM is submitted as part of Catalog item.
You can use "Submit Catalog Item Request" flow action and it will generate Service Request (REQ and RITM)
Submit Catalog Item Request action
You can submit a record producer using script as well
see these links
How to Submit record producer using script ServiceNow
Submit the record producer from script
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
7m ago
Yes it should be right indeed.
The problem now is how the record producer should trigger the flow ?
for now is
But the record producer creates a Case and the flow is not being trigger 😞
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3m ago
With that trigger the system await a RITM to be submitted but its a case being created by record producer
