Below script in nor working correctly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2024 09:20 AM
Hi All,
I have written below inbound email action script on sc_req_item table
by using that 2 request are created 1 with proper catalog item and another one in without catalog item please let me know what is issue in my script.
Thanks & Regards
KP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2024 10:47 PM
Hi @keval3 ,
Use only one time to generate the RITM. Use below code exactly.
You can run this in background script as well, just to check that it create only one RITM.
Let me know if still face any issue.
var id = GlideGuid.generate(null);
var cart = new Cart(id);
var item = cart.addItem('49dd78a3db427c50eeb8026dd3961902');
cart.setVariable(item, 'contact_type', 'email');
cart.setVariable(item, 'sub_heads', 'nurture_business');
var request = cart.placeOrder();
And make sure your inbound action is executing only one time.
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2024 10:56 PM
Hi Ranjay,
I have used same code now still 2 tickets created. 1 with items and another one is blank.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2024 01:57 AM
Hi Ranjay,
I have tried same code in test instance in that blank tickets are created. items are not getting populated. please help me resolved my issue. kindly find below screen snap.