UI Action Client Script assistance please
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2025 10:24 AM
Hello,
I have added this code to an existing UI Action client script because I need to ensure that when the user selects a Type of Correction Requested that is added after the initial submission, that those fields will be required. To further clarify, if the user initially selected the Term for the account when submitting the case and then needs to go back and add another type of correction requested like backdating, there is another field that displays dynamically that the user has to fill in before clicking the Resubmit button. My script below is requiring the user to complete all of the fields even though they were not added to the form. I should only be validating fields that are on the form to ensure they are filled in. I know it is probably something stupid, but I would appreciate some assistance please?
This needed to be added to the UI Action client script because it also goes onto display a modal that the user completes before the resubmit can be completed. Doing it any other way doesn't ensure the fields are completed.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2025 10:06 AM
You need to convert your missingFields variable to a string. When you display your error message, change those lines to this:
g_form.addErrorMessage('The following mandatory fields are not filled in: ' + missingFields.join(', '));