- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-12-2025 06:09 AM
why g_form.isMandatory is not working in onLoad client script? but it's working fine on onSubmit client script
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-12-2025 06:18 AM
Its because of the order of execution. On Load client scripts will run before things like UI Policies run.
isMandatory() returns true if the field in question is mandatory, but there's lots of stuff AFTER an On Load client script that could influence that.
It's only on On Submit where everything is stable and known enough for a script to properly judge isMandatory().
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-12-2025 06:18 AM
Its because of the order of execution. On Load client scripts will run before things like UI Policies run.
isMandatory() returns true if the field in question is mandatory, but there's lots of stuff AFTER an On Load client script that could influence that.
It's only on On Submit where everything is stable and known enough for a script to properly judge isMandatory().