Can client scripts be used for both lists and forms?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2019 01:24 AM
Can client scripts be used for both lists and forms?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2019 01:28 AM
Hello,
Client scripts are mainly for forms and there is one type which is specific to lists ie oncell edit. All the other 3 types for clients scripts ie onLoad, onChange and onSubmit are for the forms?
Also if you need to add validations on a list view, you should be using a business rule.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2019 01:29 AM
onLoad() — runs when the system first renders the form and before users can enter data. Typically, onLoad() client scripts perform client-side-manipulation of the current form or set default record values. onSubmit() — runs when a form is submitted. Typically, onSubmit() scripts validate things on the form and ensure that the submission makes sense. An onSubmit() client script can cancel form submission by returning a value of false. onChange() — runs when a particular field value changes on the form. The onChange() client script must specify these parameters.
onCellEdit() — runs when the list editor changes a cell value. The onCellEdit()client script must specify these parameters.
|
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2019 04:06 AM
Hello Rakesh,
Is this answered? Do you have any other queries. If your query is answered, please do mark the correct answer and close the thread.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2019 01:29 AM
Hi rakesh,
With the exception of onCellEdit() client scripts, client scripts only apply to forms and search pages. If you create a client script to control field values on a form, you must use one of these other methods to control field values when on a list.
- Create an access control to restrict who can edit field values.
- Create a business rule to validate content.
- Create a data policy to validate content.
- Create an onCellEdit() client script to validate content.
- Disable list editing for the table.
For any other information, please refer to the official documentation:
If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.
Thank you
Cheers
Alberto