converting request from incident using ui action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-17-2024 03:56 AM - edited ‎06-17-2024 04:38 AM
We have a catalog item for example 'request anything'. Manually to create a request for this catalog item after mentioning all the mandatory field details we need to click on 'proceed to checkout' and the need to click on 'checkout' to submit a request.
Using UI Action on incident form, we want to create a request for that catalog item 'request anything'. The UI Action is in Service Operation Application scope and the catalog item is in global scope.
By using the below script, I am trying to submit a request, but this script is not submitting the request.
(function executeRule(current, previous /*null when async*/ ) {
gs.addInfoMessage('SOW Inside');
var cart = new sn_sc.CartJS();
var item = {
"sysparm_id": "sys id of the catalog item",
"sysparm_quantity": "1",
"variables": {
"request_summary": "short_description",
}
};
// var cartDetails = cart.addToCart(item);
var request = cart.checkoutCart();
// gs.addInfoMessage('SOW request_id ' + request.request_id);
gs.addInfoMessage('SOW request ' + JSON.stringify(request));
})(current, previous);
Can anyone please help me out, it is so urgent.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-17-2024 06:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-17-2024 06:18 AM
Hi @Yashsvi
Still one thing is not working.
I have to populate 3 variable values of the RITM as well as per the incident description, short description and urgency.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-17-2024 04:32 AM
You can use OOTB, create request UI action for this.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-17-2024 09:15 PM
Hi @abhisek ,
As a ServiceNow Certified Instructor, we do not recommend customizations. As platform best practice, we continuously guide implementors and developers alike to stick to what is out of the box capability of ServiceNow.
The guidance we have provided from another thread has already addressed your concern and to step back further, the usage of the technology requires evangelism and adoption to the end user.
In addition, customization will accumulate technical debt further misleading implementers and developers alike.
Reposting our response for your guidance.
Here is How: One Common Mistake: How to Convert an Incident to a Request (Using ITSM Service Operations Workspace...