In Service operations workspace, Create incident UI action redirect to details tab of incident

Harsha Pappala
Kilo Sage

Hi All, 

 

In Service Operations workspace, the UI action 'create incident' on the interaction form, redirects the user to a created incident, but it loads overview tab. We want to show the details tab of the incident, when that UI action is clicked on. 

 

Checked the UI action, action.openGlideRecord is being used to open the incident. Not sure how to show 'Details' tab, any help is appreciated

 

 

1 ACCEPTED SOLUTION

Pravindra1
Tera Guru

 

Hi @Harsha Pappala , You can give it a try, by using Workspace View rules. Navigate to Workspace View Rules>then search for workspace rule by table name > then update the form settings/tabs. 

 

Pravindra1_0-1682680401793.pngPravindra1_1-1682680437704.png

Pravindra1_2-1682680503285.png

 

View solution in original post

3 REPLIES 3

Ratnakar7
Mega Sage
Mega Sage

Hi @Harsha Pappala ,

 

You can modify the UI action script by adding a URL parameter to the 'action.setRedirectURL' function.

Here is an example script that should work:

 

function createIncident() {
  var gr = new GlideRecord('incident');
  gr.initialize();
  
  // set values for incident fields as needed
  gr.short_description = 'New incident created from interaction';
  gr.description = g_form.getValue('interaction.comments');
  gr.caller_id.setDisplayValue(g_form.getValue('interaction.customer.name'));
  
  // insert incident record
  gr.insert();
  
  // redirect to 'Details' tab of the created incident
  var redirectURL = 'incident.do?sys_id=' + gr.getUniqueValue() + '&sysparm_view=details';
  action.setRedirectURL(redirectURL);
}

 

 

If my response was helpful in resolving the issue, please consider accepting it as a solution by clicking on the Accept solution button and giving it a thumbs up 👍. This will benefit others who may have a similar question in the future.

 

Thank you!

Ratnakar

Pravindra1
Tera Guru

 

Hi @Harsha Pappala , You can give it a try, by using Workspace View rules. Navigate to Workspace View Rules>then search for workspace rule by table name > then update the form settings/tabs. 

 

Pravindra1_0-1682680401793.pngPravindra1_1-1682680437704.png

Pravindra1_2-1682680503285.png

 

Marshall Day1
Tera Expert

Hi Harsha,

Here is the info you need to make the change in order. No coding involved.

This should help you out: https://docs.servicenow.com/bundle/vancouver-it-service-management/page/product/service-operations-w...