Enhance Testing of Service Catalog Items - Tool for filling out the form?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2024 02:15 PM
Dear All,
is there any easy tool or help available to re-generate / re-fill Service Request Item Form quickly to submit / start the workflow again?
I appears very time consuming to me, to fill out all fields manually every-time etc.
Rgds
Guenny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2024 02:35 PM
Hi @Guenny ,
create following script in fix script:
var cartId = GlideGuid.generate(null);
var cart = new Cart(cartId);
//add your requested item to the cart by sys_id of the catalog item
var item = cart.addItem('4054428fdb151f0097679ec6db9619c0', 1);//change sysid
//fill in the variables on the request item form
cart.setVariable(item,"u_requested_for", "e80edd6edbec6bc097275e25ca9619a4");
cart.setVariable(item,"contact_number", "0");
cart.setVariable(item,"assignment_group", "87ec1c342b2e71406c487fb5a8da1524");
cart.setVariable(item,"application_service", "cdedfbcedb0f9744c291c170ba9619a7");
cart.setVariable(item,"short_description", 'test');
cart.setVariable(item,"description", 'test');
var rc = cart.placeOrder();
Execute fix script when it is required.
If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!
Thanks & Regards,
Sumanth Meda
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2024 03:47 PM
Hi @Guenny,
There is an amazing browser plugin called SN Util (available in Chrome and maybe some other browsers too).
It provides a lot of functionalities and one of them is auto-populating the form/catalog item with random values.
Since it populates with random values, it may not fit your purpose but give it a go.
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2024 04:34 AM
Hi, thanks for letting me know. I have installed the Util but i don'T find the AutoFill function
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2024 11:40 AM
No worries, here is a link to the 'cheat sheet' - https://www.arnoudkooi.com/wp-content/uploads/2022/05/SN-Utils-Cheat-Sheet.pdf
For your use case, open the form/catalog item and press 'Ctrl' + '/'. Then you will see some pop up on the top left corner. Type rnd and enter. FYI, just realised it only populates the mandatory field.
Cheers