- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-09-2019 12:57 PM
I have an onChange client script that runs on a parent record (custom table) when the renewal state field changes. It then updates any child records to the same renewal state. Sometimes the user will need to only change the renewal state on a few of the child items individually. There's a business rule that runs on the child record that goes through all of the items and if there are different states, it updates the parent to 'Mixed Renewal States'. When this business rule runs, I don't want the client script to run. I only want it to run if they manually update the renewal state field on the form. Is this possible?
Thank you!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-09-2019 04:27 PM
"I have an onChange client script that runs on a parent record (custom table) when the renewal state field changes"
Are you sure? I can't think of any valid use case to do this.
You can change a field on a record and then not save it, which is not a valid cause to trigger a change to another record. It is not considered the best practice to do this!
I strongly consider you revisit this implementation as a business rule.
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-09-2019 05:21 PM
I have the same issue when I change it to a business rule. I added setWorflow to false but when I change the value on the child record, it changes the value on the parent record which then changes all the children records

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-09-2019 04:27 PM
"I have an onChange client script that runs on a parent record (custom table) when the renewal state field changes"
Are you sure? I can't think of any valid use case to do this.
You can change a field on a record and then not save it, which is not a valid cause to trigger a change to another record. It is not considered the best practice to do this!
I strongly consider you revisit this implementation as a business rule.
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-09-2019 04:48 PM
You're right. I'm revamping a previous process which used scripts to allow the user to see the changes right away. But that doesn't make the most sense