Want to override Data lookup for Assignment group

Akshay14
Tera Guru

I wrote data lookup definition to auto populate Assignment Group based on the value of category in my incident form.

I also want to change value of Assignment Group manually. But when I save the form after changing the value of Assignment Group, its value is not changing to new value. Its taking value according to data lookup table only.

Appreciate any help..

Thank You in Advance.

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

Hi Akshay,



If you have a data lookup, it is going to enforce those rules over manually entered values. Perhaps a data look up was the right solution for your prior requirements, but it sounds like your requirements have changed and it may not be the right solution any longer. You may have to get in to some custom scripting with client scripts and Ajax calls.



Reference:GlideForm (g form) - ServiceNow Wiki


Client Scripts - ServiceNow Wiki


View solution in original post

9 REPLIES 9

Akshay



Can you provide me the scripts you used to accomplish this?



We have the same issue.   Lookup rules assigning groups on Incidents, someone manually changes the Assignment Group to another group and clicks Save, after it saves the Assignment Group is changed back to the Lookup Rule Assignment Group.



Please mark this response as correct and/or helpful if it assisted you with your question.
Steven

Hello Steven,



Please find below screen shot. I am guessing you probably have done this already. Let me know if its helpful or am I too late?



A - On change Client script



find_real_file.png



B - Script Include


find_real_file.png


deodis
Mega Contributor

Hello,



I have the same issue, except my assignment rules are more dificult : they run on 2 conditions : category and subcategory. Depending on those 2 fields, the assignement group changes.



I have created   assignement lookup rules and a data look up definition to answer the need. However, we also want to be able to override those with manual change of the assignement group, and for the system to save that last change.



I don't think the pasted script can help me... Thank you !


Chuck:

We share a similar business case where the data lookup rules populate the assignment group, but there are times when analysts need to change the assignment group value.  Like the OP states, doing so and saving the record actually does (re)update the assignment group value replacing the manually entered value with the "calculated" value.

If we are to use client script / script include (ajax) to provide this functionality, logic would tell us to use the dl_u_assignments table to perform the lookup since the data is already there, however i am not sure how to disable the existing script functionality (i want to use the table, not the script).

How do you continue to use the table, disable the existing "on update" script and allow us to manage this with a BR or client script?

Thanks

 

Hi John,

I don't think it's a good idea to disable any OOB functionality when we can do customizations by other ways.If we override OOB scripts then we don't receive any updates on them on upgrading of instance.

What if in future you want to use assignment rules for other requirements or you're may be already using them other places.

I would suggest you to create a custom table and move your data into it, and then use glideajax to update incident form.

I hope this helps.

Thanks, Akshay