- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2016 08:51 PM
Helsinki Service Portal does not support Client marked UI Actions. We have UI Actions on Incident form on click of which certain fields should turn mandatory on form and check for data. If the data is filled, then go ahead with server action. We are displaying incidents on Service Portal in Form Widget. How do we replicate this behavior when working on Incident records in Service Portal Form Widget?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2016 07:27 PM
HI Hardik,
Honestly at the time of my reply I did not thought about that point. But I did a quick search in the documentation and it is actually pretty simple, you can use: g_form.getActionName(), which will return your UI Action name so you can make a condition based on that name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2016 11:00 AM
Hi Hardik
I did not try this but you could try to do it with an onSubmit client script for the client side and keep the UI Action server side only.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2016 07:07 PM
So within the onSubmit Client script, how to identify which UI Action is clicked?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2016 07:27 PM
HI Hardik,
Honestly at the time of my reply I did not thought about that point. But I did a quick search in the documentation and it is actually pretty simple, you can use: g_form.getActionName(), which will return your UI Action name so you can make a condition based on that name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2017 12:18 AM
Hi Laurent,
I have similar requirement where we have an UI action on form (same would be available in service portal form).
onclick of this UI Action, we need to have a validation/confirmation dialog box to confirm on proceeding with action.
As suggested, we have tried onSubmit client script as below and based on action name, we will display confirmation dialog
function onSubmit() {
//Type appropriate comment here, and begin script below
var actionName = g_form.getActionName();
alert(actionName);
}
but it is not giving any alert in service portal
Could you please help on same ASAP? we have stucked here. Quick reply would be much appreciated.
Thanks!!
Regards,
Pavan.