
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2025 04:12 PM
Change Management: Requirement is planned start and end dates can't be in the past. I'm enforcing this with onChange Client Scripts on the 'start_date' and 'end_date' fields and displaying a field error. To prevent saving with the bad dates, I also wrote an onSubmit script that stops the save. All of this works fine in the legacy view.
In Service Operations Workspace, the onSubmit script doesn't work because it uses a GlideAjax call, that's synchronous. If it's asynchronous the Submit completes before the answer comes back that it shouldn't save. So - I created a business rule, that essentially does the same thing as the onSubmit, and scripted it to only run on the SOW, so users in legacy don't get two error messages. Here's where it get weird: in the 'Schedule' card in the contextual side panel (accessed by clicking 'Schedule') if you set dates in the past and click the 'Schedule' button, it simply fails to save - no error. If you then click the 'edit' icon in the Schedule card, you get the error message. So, it appears the BR is running when a user clicks the 'Schedule' button on that card (it's aborting) but the timing is off, so it doesn't tell the user why it's not saving.
Any idea what's going on here?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2025 08:17 AM
Thank you very much for your help on this. I've fixed it!
In an OOB dev instance, the client script 'Form Submitted Failure' is linked to the data resource 'Form Controller' for the event 'Form Submit Completed'. In my customer's instance, it was not, so I linked it. Also, the Form message property of 'Form 1' in my customer's instance was populated by 'record_1>form>message' and OOB it's a Client State parameter called 'formMessages'. I created this client state parameter in the instance, and linked it to the Form Message property.
Only issue now is that there is a scroll bar in the 'Invalid value on Update' message for some reason, but that's just cosmetic.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2025 03:15 PM
I got this working! On customer's instance, the client script 'Form Submitted Failure' wasn't linked to any Data Resources, so I linked it to 'Form Controller', and on Form 1 the 'Form messages' was miscoded to get messages from 'record_1' and it should be the Client State Parameter 'formMessages'. There's an odd green bar in the messages, but we can live with that for now.
Thank you for your help. It wasn't the answer, but it definitely pointed me in the right direction.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2025 08:17 AM
Thank you very much for your help on this. I've fixed it!
In an OOB dev instance, the client script 'Form Submitted Failure' is linked to the data resource 'Form Controller' for the event 'Form Submit Completed'. In my customer's instance, it was not, so I linked it. Also, the Form message property of 'Form 1' in my customer's instance was populated by 'record_1>form>message' and OOB it's a Client State parameter called 'formMessages'. I created this client state parameter in the instance, and linked it to the Form Message property.
Only issue now is that there is a scroll bar in the 'Invalid value on Update' message for some reason, but that's just cosmetic.