g_form.checkMandatory = false; is not working accross multiple tabs of a change record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2024 08:03 AM
Hi everyone,
I am trying to bypass mandatory fields on a change record when the "Cancel Change Request" UI action is kicked off.
Currently, when someone clicks on Cancel Change Request (our UI action) it forces the user to complete all mandatory fields on the form before allowing them to cancel the change request.
Our change records have multiple tabs - a Planning tab with details of change, and Schedule tab with start and end dates of change window. Both tabs contain mandatory fields.
Here is my issue. The below script command works great on the main Planning tab and removes mandatory requirements for all the fields on that tab, but it doesn't apply to the Schedule tab. I still have to populate the Start and End date fields on the Schedule tab before it will allow me to cancel the change
Thanks in advance for any guidance on how to handle
Dave

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2024 09:08 AM - edited 05-14-2024 09:12 AM
What state is the change in? Out of the box nothing is mandatory until you request approval. So if they have requested approval already these fields should have been filled out.
Edit: You can check your UI policies that make fields mandatory and make sure the canceled is not selected as a state where things are mandatory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2024 09:42 AM
We use a custom Cancel Change Request UI action. Here is what happens, for example, the CR gets rejected based on various business rules, which automatically clears out the start and end date fields, and forces the user to re-enter and submit for approval. But, for various reasons, the user decides to just cancel the request, but cannot until the start and end date fields are repopulated.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2024 09:51 AM
I think you best be would be to make sure cancel state is not selected in the UI Polices that make the fields mandatory. That way when you UI Action sets the state to canceled it should revers the UI Policy and make everything not mandatory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2024 10:04 AM
Thanks Brian. I did take a look at the UI polices and didn't see any conflicts. I think the issue is a little different though. The script won't progress to set the State to Cancelled until all mandatory fields are populated. Plus, the script works on mandatory fields (sets the requirement to "false") on the Planning tab, but not fields located on the other tab (Schedule tab) in CR.