Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Customize the Resolve UI Button on incident Workbench

praveen43
Tera Expert

Hi ,

I would like to have a customized resolve button on the Incident Workbench.

I have a field Overview on the incident table. When user clicks on the resolve button on the incident workbench. I would like to populate the data that is already there on the field.

Below is the screeshot-

find_real_file.png

Here we can see that the Resolution notes is populated with the below code.

ar dialog = GlideModal.prototype.get("sn_major_inc_mgmt_mim_workbench_resolve");
var closeCodes = dialog.getPreference('CLOSE_CODES');
var currentCloseCode = dialog.getPreference('CURRENT_CLOSE_CODE');
var currentCloseNotes = dialog.getPreference('CURRENT_CLOSE_NOTES');

 

I would like to know how the above preferences are defined.

Thanks and Regards,

Praveen

1 ACCEPTED SOLUTION

praveen43
Tera Expert

Hi,

I was able to achieve this.

In Client script of the UI page - mim_workbench_resolve.

we have window.NOW.MAJOR_INCIDENT_WORKBENCH.sys_id.
This will return the sys_id of the incident.

So I created a client callable script include and passed the sys_id to get the incident fields values as a response.

View solution in original post

8 REPLIES 8

bro he is asking about this:

ar dialog = GlideModal.prototype.get("sn_major_inc_mgmt_mim_workbench_resolve");
var closeCodes = dialog.getPreference('CLOSE_CODES');
var currentCloseCode = dialog.getPreference('CURRENT_CLOSE_CODE');
var currentCloseNotes = dialog.getPreference('CURRENT_CLOSE_NOTES');

 

how are these configure,CURRENT_CLOSE_NOTES,CURRENT_CLOSE_CODE because m also facing the same issue

praveen43
Tera Expert

Hi,

I was able to achieve this.

In Client script of the UI page - mim_workbench_resolve.

we have window.NOW.MAJOR_INCIDENT_WORKBENCH.sys_id.
This will return the sys_id of the incident.

So I created a client callable script include and passed the sys_id to get the incident fields values as a response.

Pratiksha2
Mega Sage

Hello @praveen43 

How you add the overview and findings fields on the  Incident Workbench when click on resolve button?

 

I am having same requirement so please let me know.

Thanks in advance

praveen43
Tera Expert

Hi @Pratiksha2 ,

Sorry I missed the message. Yes I added it.