how to force new Hardware product model records into the global domain.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2024 01:37 PM
I have a business rule created for this.
Before Insert
Order - 10000
Condition - Class is hardware model
Script -
(function executeRule(current, previous /*null when async*/) {
setGlobalDomain();
function setGlobalDomain() {
//make current transaction uncancelable while this rule runs,
//set variable to previous cancelable state to restore when done
var isCancelable = gs.setCannotCancel(true);
current.sys_domain = 'global';
//restore previous cancelable state
gs.setCannotCancel(isCancelable);
}
})(current, previous);
However this doesn't seem to work. It still creates the new hardware product model under the user domain.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2024 11:05 PM
Hello @anerivirani19,
For a similar kind of issue, please refer to the link below:
https://www.servicenow.com/community/itsm-forum/how-to-force-new-manufacturer-records-into-the-globa...
If it is helpful, please mark it as helpful and accept the correct solution. In the future, it might be helpful for someone to refer to this solution.
Thanks & Regards,
Abbas Shaik