• Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers
  • Advertising & Talent Reach devs & technologists worldwide about your product, service or employer brand
  • OverflowAI GenAI features for Teams
  • OverflowAPI Train & fine-tune LLMs
  • Labs The future of collective knowledge sharing
  • About the company Visit the blog

Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Get early access and see previews of new features.

Assigning the fulfillment group based on user's location using assignment lookup rules in catalog task advance script

I created a script in catalog task in workflow to find the location of the current user and find which assignment lookup rule should be use base on the location. But it's not working.

Appreciate all the help. Thank you.

Evren Yamin's user avatar

2 Answers 2

Judging by the table name that looks like a data lookup table. Is there any reason why you are not trying to implement this requirement using the Data Lookup Definitions rather than Assignment Rules?

If you are insistent on taking this route, then the last line should read

as that would be a Sys ID and not the display value of the location. The script would be running on the current task record, so it's accessed using current . Also, take steps to verify that the field name is indeed task_fulfillment_group .

Shaz's user avatar

Adding on to the given answer, please add the following at the last line of your code, provided that task is also a GlideRecord.

Rupali Bhatnagar's user avatar

Your Answer

Reminder: Answers generated by artificial intelligence tools are not allowed on Stack Overflow. Learn more

Sign up or log in

Post as a guest.

Required, but never shown

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy .

Not the answer you're looking for? Browse other questions tagged servicenow or ask your own question .

  • The Overflow Blog
  • LLMs evolve quickly. Their underlying architecture, not so much.
  • From PHP to JavaScript to Kubernetes: how one backend engineer evolved over time
  • Featured on Meta
  • We've made changes to our Terms of Service & Privacy Policy - July 2024
  • Bringing clarity to status tag usage on meta sites
  • Feedback requested: How do you use tag hover descriptions for curating and do...
  • What does a new user need in a homepage experience on Stack Overflow?

Hot Network Questions

  • "can-do" vs. "can-explain" fallacy
  • If Miles doesn’t consider Peter’s actions as hacking, then what does he think Peter is doing to the computer?
  • Immutability across programming languages
  • Please help me to identify specific house plant
  • How to make a ParametricPlot3D into solid shape
  • Trying to find an old book (fantasy or scifi?) in which the protagonist and their romantic partner live in opposite directions in time
  • What are the limits of Terms of Service as a legal shield for a company?
  • Why cant we save the heat rejected in a heat engine?
  • What is the Isp of Thin Film Isotope Nuclear Rockets?
  • There are at least 3 versions of a quote, with 2 having different attributions. What is the original, who said it, and what does the quote mean?
  • Implementing SHAKE using SHA3
  • Did US troops insist on segregation in British pubs?
  • Is there any video of an air-to-air missile shooting down an aircraft?
  • Is there ambiguity in the following sentence or did I misunderstand it?
  • What is it called when perception of a thing is replaced by an pre-existing abstraction of that thing?
  • Hotspot vs home internet
  • Lucas number multiples of Fibonacci pairs
  • Can I retain the ordinal nature of a predictor while answering a question about it that is inherently binary?
  • How to ensure a BSD licensed open source project is not closed in the future?
  • Does a MySQL replication slave need to be as powerful as the master?
  • Replacing old style 2 way switch with a new style
  • Why half in Lagrangian density of Klein-Gordon field?
  • Seth and Cain take turns picking numbers from 1 to 50. Who wins?
  • Antenna speed: slow and fast tracking( explanation of a parameter in comparison table)

servicenow set assignment group in script

mtcoffee

A ServiceNow and DevOps enthusiast. I use this blog to share ideas and learn from others.

  • Custom Social Profile Link

ServiceNow Automatically set Assignment Group

1 minute read

This is a useful tidbit for auto populating assignment groups. ServiceNow does have a few features that make it possible to auto assign groups based on criteria such as:

  • Assignment Lookup Rules
  • Data lookup definitions

However, sometimes a simple client script can offer less overhead. In this case I had the following requirements.

  • When a requester picks a group it will auto set the assignment group to the Configuration Item approver group
  • The requester can accept this or choose to override it
  • If a group is not found on the CI, a pop up will alert them to select it manually

To accomplish this the client script was as follows:

Name : Populate Assignment Group Type : onChange Field Name : cmdb_ci (Configuration Item)

Set that on your table (incident/change etc) and your all set!

Why not Assignment Rule?

I was asked, why not create an assignment rule, after all its built into the product. For example a simple rule under System Policy -> Assignment, defined using this script snippet will work.

Sample snippet:

However it is server side and does not set until after the user saves the record. This would be ideal if you wanted to “Hard enforce” that the assignment group must be set by the CI, however if your requirement is to allow the user to override then a client script is the preferred route.

Leave a comment

You may also enjoy, zabbix alerts and servicenow event management.

3 minute read

Summary https://docs.servicenow.com/bundle/washingtondc-it-operations-management/page/product/event-management/task/t_EMConfigureZabbixConnector.html

Grafana Alerts and ServiceNow Event Management

2 minute read

Summary Grafana is both a log/metric visualization tool and an alerting tool. It can be configured to send its alert data to ServiceNow Event Management, inc...

Building a ServiceNow ITOM Homelab with XCP-NG

Summary For anyone interested in ServiceNow ITOM, there’s no better way to learn than on your own infrastructure that you can tear down and rebuild as needed...

Updating ServiceNow from Ansible or AWX

Summary Ansible has a built-in collection that allows you to connect to a ServiceNow instance and do things like: Create or Update an Incident/Change/Prob...

ServiceNow: Building Powerful Workflows by Tim Woodruff, Ashish Rudra Srivastava, Martin Wood

Get full access to ServiceNow: Building Powerful Workflows and 60K+ other titles, with a free 10-day trial of O'Reilly.

There are also live events, courses curated by job role, and more.

Setting the Assignment group with Assignment Rules

Assignment Rules are a simpler alternative to Data Lookup. While Data Lookup is very powerful, allowing you to set any field, it does involve a quite a bit of configuration, including creating a new table.

In contrast, an Assignment Rule uses the simpler condition builder to specify when it should run. If it matches, then it'll either populate the Assigned to and Assignment group fields with a hardcoded value, or you can use a script. We have got the group we want to use in a property, so this option is perfect. Follow these steps:

  • Name : Assign to External Team
  • Table : Maintenance [x_hotel_maintenance] ...

Get ServiceNow: Building Powerful Workflows now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.

Don’t leave empty-handed

Get Mark Richards’s Software Architecture Patterns ebook to better understand how to design components—and how they should interact.

It’s yours, free.

Cover of Software Architecture Patterns

Check it out now on O’Reilly

Dive in for free with a 10-day trial of the O’Reilly learning platform—then explore all the other resources our members count on to build skills and solve problems every day.

servicenow set assignment group in script

Instantly share code, notes, and snippets.

@cmcdevitt

cmcdevitt / popup_all_parts.js

  • Download ZIP
  • Star ( 2 ) 2 You must be signed in to star a gist
  • Fork ( 0 ) 0 You must be signed in to fork a gist
  • Embed Embed this gist in your website.
  • Share Copy sharable link for this gist.
  • Clone via HTTPS Clone using the web URL.
  • Learn more about clone URLs
  • Save cmcdevitt/fec42ed7e2b1aeb5bac4b2cb2e7227a1 to your computer and use it in GitHub Desktop.
//Reject Popup / Jelly
/*
Reject UI Action
Name: Reject
Action Name: reject_state //becomes the "ID" attrubute in the HTML Object
Form button: true
Client: True
OnClick: showReviewdialog()
Condition: custom based on needs
*/
//Script
function showReviewdialog() {
if (g_form.modified) {//Makes sure the Form Data is save before proceeding
g_form.addErrorMessage(new GwtMessage().getMessage("Before Rejecting, you must save your changes."));
return;
}
var title = getMessage("Reassign this to");
var sysId = g_form.getUniqueValue(); //Get the sys_id for this form
var dialogClass = GlideModal ? GlideModal : GlideDialogWindow;
var dd = new dialogClass("sn_vul_getAG"); // UI Page to call 'sn_vul_' prefix to scope
dd.setTitle(title);//Popup Window title
dd.setPreference('sysparm_vdt', sysId); //IMPORTANT *SEND DATA TO JELLY* via URL
//dd.setPreference('sysparm_is_entry', true);
dd.setWidth(500);
dd.render();
}
// End UI Action
/*
UI Page
Name:getAG (becomes sn_vul_getAG)
--- Start HTML ---
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<style>
.modal-footer {
margin-top: 10px;
}
.list-padding {
padding-left:20px;
margin-top:10px;
margin-bottom:10px;
}
</style>
<g:ui_form>
<!-- IMPORTANT *RECEIVE DATA via URL* --> dd.setPreference('sysparm_vdt', sysId); -->
<input type="hidden" id="vdtID" name="vdtID" value="${JS:sysparm_vdt}"/>
<!-- Render the Assignment Group Lookup object, make it 'required' -->
<g:ui_reference name="assignment_group" id="assignment_group" table="sys_user_group" required="required"/>
<div id="bulk_error_messages" style="display:none" class="outputmsg_container">
<button class="btn btn-icon close icon-cross">
<span class="sr-only">${gs.getMessage('Close Messages')}</span>
</button>
<div class="outputmsg_div"></div>
</div>
<footer class="modal-footer">
<g:dialog_buttons_ok_cancel ok_text="${gs.getMessage('Submit')}" ok_title="${gs.getMessage('Submit')}" ok="return onSubmit();" ok_style_class="btn btn-primary"
cancel_text="${gs.getMessage('Cancel')}" cancel_title="${gs.getMessage('Cancel')}" cancel="return onCancel();"/>
</footer>
</g:ui_form>
</j:jelly>
<!-- IMPORTANT *DATA SENT* via URL value pair based on the html "id" (name?) attribute -->
--- END HTML ---
*/
//UI Page Client Script
function onCancel() {
GlideDialogWindow.get().destroy();
return false;
}
function onSubmit() {
return this._isFormValid();
}
function _isFormValid() {
var ag = $j("#assignment_group");
if (ag.val().length == 0) {
showErrorMessage('Assignment Group is manadatory');
return false;
}
return true;
}
function showErrorMessage(messageText) {
if (messageText) {
var errorMsg = '<div class="outputmsg outputmsg_error notification notification-error"><img class="outputmsg_image" src="images/outputmsg_error_24.gifx"/>' + messageText + '</span></div>';
$j('#bulk_error_messages > .outputmsg_div').append(errorMsg);
$j('#bulk_error_messages').show();
}
}
function removeErrorMessage(e){
if (e){
e.preventDefault();
e.stopPropagation();
}
$j('#bulk_error_messages').hide();
$j('#bulk_error_messages > .outputmsg_div').html('');
}
// Processing Script
response.sendRedirect('sn_vul_vulnerability_deferral_task_list.do');
//IMPORTANT *RECEIVE DATA* via URL from Page submission.
//The html ID (name?) becomes the variables passed back see above
var vdt_ID = request.getParameter('vdtID');
var group_ID = request.getParameter('assignment_group');
var vdt = new GlideRecord('sn_vul_vulnerability_deferral_task');
vdt.get(vdt_ID);
vdt.setValue('assignment_group', group_ID);
vdt.setValue('state', 13);//Rejected
vdt.update();

ServiceNow Guru Logo

Advanced ‘getMyGroups’ Function

I f you’ve taken a look at the ‘My Groups Work’ module (or maybe a particular security rule or report) you may have noticed that the condition or filter for that record makes a function call to return a list of values to compare against the value in the given field. In the case of the ‘My Groups Work’ module under the ‘Service Desk’ application there is a function called ‘getMyGroups’ that is used to identify task records where the assignment group value is one of the groups for which the current user is a member.

The ‘getMyGroups’ function simply returns an array of group sys_id values for the groups that a user belongs to. I saw a forum posting recently that pointed out (correctly) that the ‘getMyGroups’ function only returns group membership, but doesn’t return groups where the user is listed as the manager. The function also doesn’t attempt to return child groups of the groups where a person is a manager or group member. So, if I am the Director of Operations and I want to see a list of all tasks for the Operations group (which I am a manager of) as well as the sub-groups of that group, I would have to be added specifically to each sub-group to have all of the groups that I am interested in tracking be displayed in the list.

With some help from John Andersen, I’ve created the ‘Advanced getMyGroups’ function. This function is designed to give users a better way to display group membership information. It is used in the same way that you would use the ‘getMyGroups’ function, but also includes an optional parameter that allows you to return groups managed by an individual and/or sub-groups of a given group where I am a member or manager. The ‘maxDepth’ parameter returns the values as shown below…

  • No maxDepth returns groups where user is a group member (Same as current ‘getMyGroups’ function)
  • maxDepth of 0 returns groups where user is a group member or a manager
  • maxDepth greater than 0 returns groups where user is a group member or a manager PLUS all child groups up to ‘maxDepth’ levels deep

The most common usage of this function is probably in a filter on a module or a report. So, if I were creating a module to show all tickets where I am a member of the group OR where I am the group manager, PLUS all of the sub-groups up to 5 levels deep I could use the following in my filter…

‘javascript:getMyGroupsAdvanced(5)’

servicenow set assignment group in script

Mark Stanger

Date Posted:

May 4, 2010

Share This:

33 Comments

' src=

How do I make this work?

javascript:getMyGroupsAdvanced(5).GetGroupFilter(‘database,network’)

' src=

I don’t think that you do. As far as I’ve seen, the ‘GetGroupFilter’ function is used for reference qualifiers but wouldn’t be applied in this way for a module or report filter.

Great script!

thank you for all your work!

Thanks for this, greatly appreciated! Perfect timing too, I started looking for a way to do exactly this on the same day you posted it.

Excellent, thank you very much, Mark! Works great!

I’ve also noticed that getMyGroups returns groups from above, i.e. parents of any groups you are a member of.

I am a member of Problem, which has a parent of SLM

when running getMyGroups I also get tickets assigned to SLM, I’m only interested in Problem group tickets.

Oddly, the filter also displays the parent group as though I’m only filtering on that.

Tasks-ASSIGNMENTGROUPIS SLM

This is great, thanks for this. Kind of weird there is no option in ServiceNow to do this automatically. Any ideas on how we would get this code to work in the report section. i.e. if we give users the ability to create reports for their groups, out of the box they can create reports for their groups and any of the associated parent groups of the child groups they belong to. We need this to be the other way around, i.e. if you are a member of a parent group and you click on the visible to: Group button you should see that parent group and also the parent s children??

The report page is back-end XML so there’s no way to directly manipulate the behavior of that page. You might be able to use a UI script to manipulate the functions there but that would be a pretty significant hack that would probably end up breaking during an upgrade. It’s probably best to request this as an enhancement with ServiceNow support.

Thanks for the reply Mark, I find it strange that this is not something that is easily amended, i.e. to change the search on groups for the user. Im sure this is something that many people have come across. It doesnt make sense not to be able to see the applicable hierarchy you are in, so it really does seem like a big limitation. Thanks again for the information and advice.

This seems to be working, but for some reason along with all the managers groups, it also shows tasks without an assignment group. Anyway to stop this from happening?

p.s. Adding a filter that says Assignment Group is not blank does not seem to work.

Sounds like maybe the issue is with your instance then. Can you reproduce this in the ServiceNow demo instance?

Discovered the actual problem I’m having is that when trying to return closed and open tasks, the open tasks return fine but closed tasks display without details. I haven’t yet discovered how to resolve this.

This did not work at all for me. I also tried it on the demo site and it did not work. The Assignment Group came back blank. Any ideas? Are there any other steps besides creating the function in the Global Business Rules?

Please let me know. Thanks! Jeff

I just tested this at https://demo13.service-now.com and it works fine there. I’ve modified the ‘My Groups Work’ module to use the function. You can validate that it works correctly by impersonating Don Goodliffe. Make sure to check that your business rule is set up on the ‘Global’ table and that the ‘Client callable’ checkbox is checked.

I have a user defined field called Division on my sys_user table, this field is just a reference field back to cmn_department.

I wanted to create a function similar to getMyGroups() & getMyAssignments() to use in filters.

This is not working for me. Here is my getMyDivision business rule: Name = getMyDivision table = Global[global] Client callable = true Active = true Script:

function getMyDivision(){

var MyDivision; var uID = gs.getUserID();

var user = new GlideRecord(‘sys_user’); user.addQuery(‘user’, uID); user.query();

while(user.next()){ MyDivision = user.u_division.toString(); //u_division is simply a reference field back to cmn_department }

return MyDivision; }

All the other examples (getMyGroups) seem to simply return an array of Strings, where each string is the sys_id. That is what I am basically doing here, but my reports don’t seem to work when I use the javascript:getMyDivision()

I have also tried returning an array of Strings, a cmn_department variable, and an array of cmn_department variables nothing works

Is something wrong with my script? I couldn’t seem even find the getMyGroups function to look at that code, but did find some reference that makes me believe that is a server side function tied to the User class.

Any help is greatly appreciated!

I think you could simplify this quite a bit. Try putting this within the ‘getMyDivision’ function.

return gs.getUser().getRecord().getValue(‘u_department’);

Gee thanks! much simpler and the function now works in my filters. So, the getValue function grabs the actual sys_id, where in my script the u_division.toString() was probably not neccessary.

Anyone else having issue with this business rule after Berlin upgrade? It was working fine before upgrading. After upgrading to Berlin, it works only for users with “admin” role. It does not return any groups if the user does not have “admin” role.

This still works for us, but please note, In order to get this to work initially (prior to Aspen or Berlin) I needed remove the following lines:

//Remove any duplicates from group string groupArr = checkDuplicates(groupArr);

Not sure is that will help you or not. good luck!

Thanks Jeff.

I figured what was causing this. The property “glide.script.use.sandbox” was enabled. When I disabled it, the business rule started working again for non-admin users. Are you having this property disabled?

Disabling that property probably isn’t a good idea, and it shouldn’t be necessary if you’ve got the ‘Client callable’ checkbox checked in your global business rule.

The property was enabled before Berlin and the business rule was running fine. After Berlin, the issue started. The ‘client callable’ checkbox was always checked.

I don’t have High Security Settings plugin enabled. Could this be the reason?

It may be due to the lack of High Security, but I doubt it since this solution was in place before High Security was the norm. I just tested this again on my Berlin release (with High Security enabled) and it works fine. You could confirm by testing in a ServiceNow demo instance.

This was working fine for us until we started testing Calgary and then I ran into the same issues discussed above. This only works for users who have the admin role. We currently do NOT have the High Security plugin enabled so that isn’t the issue. I tried commenting out the following line as suggested by Jeff above with no luck:

Did anyone find a solution to this with Berlin?

another note…if I go to demo and put this into an instance with Calgary it works. It seems to be related to the upgrade with this in place.

Hi Mark, I did this in Dublin and it spits out this warning when I save the rule”getMyGroupsAdvanced Business Rule contains code outside of a function. Code which exists outside of a function will run against every transaction; therefore, all code should be within a function and invoked as needed.”. I am a bit hesitant to turn it on now, as it seems serious.

Any ideas? Regards, Howard Elton

I haven’t ever had anyone report an issue related to this. The only code outside of a function are a couple of variable declarations so there shouldn’t be a huge concern.

I’ve just updated this to use a script include instead of a global business rule. That should solve the error you’re getting. Performance should really be the same, but this will follow current best-practice more closely.

We have been successfully using this for a number of years now. We are currently on Calgary testing Eureka. In Eureka when I go to “My Groups Work”, in the assignment group field of the filter it is blank. We have indeed changed the old global Business Rule to the new Script Includes. I know we have a lot of groups that the manager is not an assignee in the group but wants that visibility which this has done. Any thoughts?

I should have dug through the thread better. The problem I was experience was addressed by Ahmed Abdrabalnabi above. After reading the thread I checked and sure enough the issue would not occur if the user had the admin role. So I checked the system property of “glide.script.use.sandbox” and found it was set to true…changed that to false and it now works. I will admit that it still doesn’t make complete sense because that property itself states “If enabled, only those business rules and script includes with the “Client callable” checkbox set to true are available” and as stated, the script includes here has “Client callable” checked. I did confirm that I didn’t miss that. Just a bit strange.

I notice this pulls from the Task table but I need to get a state from the incident table, any suggestions on how I can accomplish this?

I’ve got the same problem on Geneva. If the user is non admin and glide.script.use.sandbox is true then the returned groups from the module ‘My Groups work’ is empty. What is strange is when the same function is called from a script in an application menu is works. I try to set glide.script.use.sandbox to false but I got and error message saying this operation is unsafe.

Finaly I’ve succeeded with the following code :

var GMGA = Class.create(); GMGA.prototype = Object.extendsObject(AbstractAjaxProcessor, { type: ‘GMGA’ }); var maxDepth;

var groupArr = []; var finalArr = [];

GMGA.getMyGroupsAdvanced = function (inputDepth) {

The rest of the code is untouched. For calling the function use : javascript:GMGA.getMyGroupsAdvanced(5)’

For me it’s a kind of black magic!

I tried using a similar script to add a parent group member to child groups upon insert. Do you have a business rule or SI that is similar to accomplish this?

Comments are closed.

servicenow set assignment group in script

  • Using Import Sets for REST Integration in ServiceNow August 26th, 2024

servicenow set assignment group in script

Achim says:

' src=

Jacob Kimball says:

  • Announcements
  • Architecture
  • Business rules
  • Client scripts
  • Content management
  • Email Notifications
  • General knowledge
  • Generative AI
  • Graphical workflow
  • Integration
  • Knowledge Management
  • Miscellaneous
  • Performance
  • Relationships
  • Script includes
  • Service Portal
  • Single Sign-on
  • System Definition
  • Web Services

Related Posts

Easily Move Customer Updates Between Update Sets

Easily Move Customer Updates Between Update Sets

Condition Builder Attributes That Pack a Punch

Condition Builder Attributes That Pack a Punch

Demystifying Cryptography in ServiceNow: A Comprehensive Guide to Secure Data Transmission

Demystifying Cryptography in ServiceNow: A Comprehensive Guide to Secure Data Transmission

Fresh content direct to your inbox.

Just add your email and hit subscribe to stay informed.

servicenow set assignment group in script

Since 2009, ServiceNow Guru has been THE go-to source of ServiceNow technical content and knowledge for all ServiceNow professionals.

  • Using Import Sets for REST Integration in ServiceNow
  • Customize the Virtual Agent Chat Button in Service Portal
  • Leveraging Joins in GlideRecord Queries

© Copyright 2009 – 2024 | All Rights Reserved

web analytics

developer portal logo

Your browser or one of your plugins is not allowing JavaScript to be run. This is a bummer since the ServiceNow Developers Site is dynamic and depends on JavaScript to function. If you want to visit this site, please disable the plugin, activate this site for JavaScript or use another browser.

Get the Reddit app

Subreddit for ServiceNow users, admins, devs, platform owners, CTOs and everything in between.

Need help with an assignment rule script that will assign all incidents to a particular group between certain hours

Used the script below on the script portion of the assignment rule but it doesnt seem to assigning it to the Help Desk group during the scheduled hours..  This is a fresh OOB developers instance. Any ideas?

var date = new GlideDateTime(current.sys_created_on); var schedule = new GlideSchedule("1b9294741b41011067212f08b04bcbfc"); var flag = schedule.isInSchedule(date); gs.log(flag,'ScheduleCheck'); if(flag == true){ current.assignment_group.setDisplayValue("Help Desk");

By continuing, you agree to our User Agreement and acknowledge that you understand the Privacy Policy .

Enter the 6-digit code from your authenticator app

You’ve set up two-factor authentication for this account.

Enter a 6-digit backup code

Create your username and password.

Reddit is anonymous, so your username is what you’ll go by here. Choose wisely—because once you get a name, you can’t change it.

Reset your password

Enter your email address or username and we’ll send you a link to reset your password

Check your inbox

An email with a link to reset your password was sent to the email address associated with your account

Choose a Reddit account to continue

IMAGES

  1. How to Create an Incident Report Based on Assignment Group in ServiceNow

    servicenow set assignment group in script

  2. ServiceNow

    servicenow set assignment group in script

  3. How to Assign a User to a Group in ServiceNow

    servicenow set assignment group in script

  4. Automatic support group determination based on SAP transaction

    servicenow set assignment group in script

  5. How to Find the Person Assigned to Your ServiceNow Ticket

    servicenow set assignment group in script

  6. Learn about ServiceNow Scripting

    servicenow set assignment group in script

COMMENTS

  1. Configure the group type for assignment groups

    Loading... Loading...

  2. servicenow

    I created a script in catalog task in workflow to find the location of the current user and find which assignment lookup rule should be use base on the location.

  3. Update assignment group based on a script on a record producer

    Update assignment group based on a script on a record producer. Description: I currently have a script on our user facing service portal that changes the assignment group based on the incident type selected. I currently have it assigning to one group if the "policy" type is selected, however, I would like to add an additional section to this ...

  4. ServiceNow Automatically set Assignment Group

    This is a useful tidbit for auto populating assignment groups. ServiceNow does have a few features that make it possible to auto assign groups based on criteria such as: Assignment Lookup Rules. Data lookup definitions. However, sometimes a simple client script can offer less overhead. In this case I had the following requirements.

  5. Configure assignment group types

    Select the lookup icon beside the selection field and select one or more group types. Note: Because the default behavior of task.assignment_group is to filter out groups with group types defined, adding a type to a group filters it out of the Assignment Group field on tasks. To change the behavior, set up the reference qualifier. Select Update.

  6. How to auto populate "Assignment Group" field present on ...

    The requirement is to auto-populate the "Assignment Group" field present on the 'sc_req_item" table

  7. How to Create Automatic Assignment Group in ServiceNow

    Learn how to set up automatic assignment groups in ServiceNow with this instructional video.

  8. Scripting Technical Best Practices

    Scripting Technical Best Practices. Building strong functionality in ServiceNow begins with writing high-quality code. Take steps to make your code manageable, efficient, and scalable from the early stages. This helps to ensure good performance, reduces the chances of problems, and simplifies the debugging process.

  9. Assignment group of record

    The assignment group change on the change of the group membership of the user assigned to the record.

  10. Client Scripting Technical Best Practices

    Client Scripting Technical Best Practices. A Client Script is JavaScript code which runs on the client, rather than the server. Well-designed Client Scripts can reduce the amount of time it takes to complete a form and improve the user experience. However, improperly implemented Client Scripts can significantly slow down form load times.

  11. Setting the Assignment group with Assignment Rules

    Setting the Assignment group with Assignment Rules Assignment Rules are a simpler alternative to Data Lookup. While Data Lookup is very powerful, allowing you to set any field, it does involve a quite a bit of configuration, including creating a new table.

  12. ServiceNow Popup Get/Set Assignment Group · GitHub

    ServiceNow Popup Get/Set Assignment Group. GitHub Gist: instantly share code, notes, and snippets.

  13. Users and Groups

    Group members have all of the roles assigned to a group. To see a group record, use the All menu in the main ServiceNow browser window (not App Engine Studio) to open User Administration > Groups. Click a Group record to see the group members and the group roles. The Network group has five members and one role.

  14. Useful approval assignment scripts

    Useful approval assignment scripts - Product Documentation: Utah - Now Support Portal.

  15. Advanced 'getMyGroups' Function

    In the case of the 'My Groups Work' module under the 'Service Desk' application there is a function called 'getMyGroups' that is used to identify task records where the assignment group value is one of the groups for which the current user is a member. The 'getMyGroups' function simply returns an array of group sys_id values for ...

  16. Scripted Assignment Rules In Vulnerability Response

    How can Vulnerability Response assignment be delegated by a script?

  17. Groups

    A group is a set of users who share a common purpose. Groups may perform tasks such as approving change requests, resolving incidents, receiving email notifications, or performing work order tasks.

  18. r/servicenow on Reddit: Need help with an assignment rule script that

    Used the script below on the script portion of the assignment rule but it doesnt seem to assigning it to the Help Desk group during the scheduled hours.. This is a fresh OOB developers instance.

  19. Assigned to not clearing when Assignment group changes on ...

    The assigned to field is dependent on the assignment group. On the incident table the assigned to clears when the assignment group changes but this does not happen on other tables like sc_task.

  20. When using g_form.setMandatory in a client script to set ...

    The post button disappears if using a client script to set the work_notes or comments fields to mandatory. Steps to Reproduce Create a client script on the incident table. Set On Change, for assigned_to