Global Client Script not working on different view
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2024 12:29 AM
Hi All,
I have a client script which makes Additional Comments mandatory on catalog task form when the task is being moved to closed state, and in one of the view this field "Additional Comments" is not present so when the user closes the task the mandatory check fails.
What can be the solution to this ? Any suggestions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2024 12:40 AM
Hi @Anubhav24 ,
In this case you need to make sure all of the views which are on the table must have additional comments field included as part of form. or if your want exceptionally want to show additional comments on specific view then create create a UI policy with a advance script checking for view and make field mandatory and setVisible/setDisplay true for additional comments.
I hope this helps...
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2024 12:45 AM
if (g_form.isVisible('field')) {
// check if the field is visible then your logic
}
You can try like above so that your client script will be executed only if the field(additional comments) is visible. In place of 'field', use the actual field name(additional_comments). Hope it helps.
Regards,
Priyanka Jeganathan