how to add a prefix in incident number field according to the domain

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2018 09:34 AM
Hi,
I want to add a prefix in incident number field according to the domains . For ex- if my domain is ABC then if I raise a incident the prefix should be like: ABC-INC-00000(number).
Can anyone suggest how to do this.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2018 10:04 AM
pradeepksharma need your help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2018 10:26 AM
Hi Geetika,
You can go to configuration panel and type 'number maintenance ' and then in table select 'Incident' and make the changes in the prefix as you desire.
Regards,
Munender
**Please mark helpful/correct if found useful

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2018 10:30 AM
Hi Munender,
I cannot do that because it will fixed for every domain. I want on the basis of the logged in user domain, domain name should be added to prefix following the normal incident prefix.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2018 10:54 AM
I think, that's not good approach to update the number field on the fly, instead you can have custom field for number on incident form. Try with below After Insert Business Rule on incident table. I believe you need to create the BR at global domain.
(function executeRule(current, previous /*null when async*/) {
var domainname = current.sys_domain.name;
current.u_number = domainname + '-' + current.number;
})(current, previous);