Does a onSubmit client script runs on click of any server side UI Action?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2016 06:01 AM
Hi All,
I am just trying to understand this functionality here any answers would be much appreciated.
We have a server side UI Action that has action as "Chase", now there is a onSubmit client script that is called and checks for the action, there is no save or update function being called on the server side UI action. My understanding was that, that to trigger an onSubmit client script, I need to initiate a save or update function? Is my understanding incorrect, does an onSubmit client script is initiated on click of every UI action?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2016 06:10 AM
Hi Vikrant,
Here is the details,
there is two section in UI Action,
1. Client script section
2. server side script
if you want something to be validated on the current form then we use execute on client also and if you want any server related data manipulation/calculation then you need to write a code for that also.
as per your question, onSubmit client script is initiated on click of every UI action? It is no.
developer can given any function name instead of onSubmit in onClick section in the UI Action.
There is check box called client once you check that one onClick field is shown.
Hope this helps.,
Regards,
Atul Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2016 06:26 AM
A onSubmit client script runs when the form is "submitted" which pretty much mean somebody needs to hit a save/submit/update button or a ui action which has code to save the record. Like Atul mentions, if you have an UI Action that involve both client & server, then it saves the record after it has done the client part and then the onsubmit client script will hit. Otherwise you could make a ui action that just do a gs.log("HI"); pressing this ui action won't save the form you are on. But beware, if you make a ui action with just gs.log... you might go away from the form and your changes won't be saved.
//Göran