- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-19-2014 06:53 AM
Hi Experts, When user click on order now,I need to show a POP up containing text with two checkboxes as one of the variable like: Please confirm by ticking the box that a) the Contact you entered is correct b) you have changed the Contact in order from The boolean value of the tick box should also be stored. If the box was ticked, store TRUE. If the box wasn't ticked, the button "OK" cannot be selected. If "OK" gets selected, the request is created. If "Cancel" gets selected, the pop-up closes and the user is taken to the previous screen. Any idea how we can achieve the same in service catalog.
Solved! Go to Solution.
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2014 02:20 PM
Adding this piece of code on UI page of OK button will submit the catalog item:
// This will submit the order
gel("order_now").onclick = "";
var item_guid = gel("sysparm_item_guid");
if (item_guid) {
item_guid = item_guid.value;
}
g_cart.order(gel("sysparm_id").value, getQuantity(), item_guid);
}
Thanks to SN guru form for the same.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-19-2014 08:54 AM
That can be achieved by doing some customizations on the UI Page "com.glideapp.servicecatalog_checkout_view". I would use some HTML + GlideDialog (GlideDialogWindow API Reference - ServiceNow Wiki).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-19-2014 11:18 AM
Hi Marcelo,
Cant we use On Submit of the Catalog Item and do something. I dont want to touch OOB functionality.
Please let me know about the same.Any Hint how we can pass variable to popup form and make it mandatory?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-19-2014 11:25 AM
Yes, you can create the UI Page and call it on the onSubmit script using the link I sent related to GlideDialogWindow.
Please take a look into the wiki page related to Dialogs, you`ll find there the setPreference option (in order to pass variables to the popup), and all the processing on the popup will be coded into the UI Page directly,
In order to make the fields on the UI Page mandatory, You`ll have to validate if it was filled on the UI Page, by creating a function to be called once the "OK" is clicked,
Best Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2014 11:50 AM
Hi Marcelo,
While Creating a Dialog box On Submit, Form get submitted as soon as we get the dialog box gets popped up.I need to stop onSubmit catalog client script to not run until users fill all information on popup form of catalog item.
Is there any way to achieve the same?I am stuck here.
Also on the UI page, I need to create A block under which two radio button is needed. I have to force user to select any one of the radio button to select (means I have to make that Block mandatory). Any idea how we can do that?
Many thanks for your response.