- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2016 12:13 PM
When an incident is created, default assignment group should be set as "IT Systems". I was told that the best practice is to create a client script instead of setting the default value in form design.
Can anyone share script (screenshot) and suggestions?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2016 12:23 PM
Client scripts are subject to the whim of the client browser. I think it is best practice to move as much of the processing as you can to the server. I would not go Client Script here.
I would do the before insert that was suggested above.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2016 12:29 PM
Hi Ronald,
Agree with everyone on this thread to create a before business rule.Please make sure don't use current.update in before business rule to avoid performance issue.
Business Rules Best Practices - ServiceNow Wiki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2016 12:37 PM
Hi Ronald
You should use the OOTB functionality under System Policy -> Assignment.
Here you can se the assignment for a given task type (eg. incident) based on a condition. If you leave the condition empty it will assign all incidents which are saved with an empty assignment.
This way it will also catch incidents comming in through integrations (Webservice and REST) or via emails and it does not require any coding.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2016 12:42 PM
It's funny how all the nerds gravitate to scripting when there's a perfectly easy way to do this without scripting.
Defining Assignment Rules - ServiceNow Wiki
And I count myself as one of the nerds!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2016 01:19 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2016 01:23 PM
That looks right. Just be sure to take out the business rule you were trying before.