Number Maintenance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2023 04:29 AM - edited 05-30-2023 04:30 AM
I have Number Maintenance created for Case table with Prefix 'CS', when I create a Major Case I want the prefix as MIM, how to achieve this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2023 04:33 AM
You can write a before insert BR on the case table and if it is major case, replace CS with MIM in number field.
Thank you,
Ali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2023 04:34 AM
Can you help me with the script?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2023 04:40 AM
I am not much aware of condition for the BR to identify major case, I assume you can update that.
As far as script goes, you can write below script:
var number = current.getValue("number");
if(number){
current.number = number.replace("CS", "MIM");
}
Note: it should be before insert BR.
Thanks,
Ali
Thank you,
Ali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2023 04:43 AM
Thanks. Can you check this thread as well
https://www.servicenow.com/community/developer-forum/in-major-case-change-view-for-child-case/td-p/2...