How to override OOB field value in SOW?

Arun Kumar D
Tera Contributor

Hello Everyone,

I would like to know how can i set the Priority from 4-Low to 3-Moderate when someone clicks on "New Incident" option [Highlighted in the attached screenshot].

Where i can find the relevant configuration to do this change?
What are those "New Incident"/"New Change Request"? It's not UI action.

Kindly suggest. Thanks in advance.

1 ACCEPTED SOLUTION

Chaitanya ILCR
Kilo Patron

Hi @Arun Kumar D ,

create a onload client script on incident table

with UI type =All

and uncheck the global and populate the view name = sow_new_record

 

ChaitanyaILCR_0-1749753106359.png

 

update the impact and urgency values as per your priority lookup rules

 

function onLoad() {
   //Type appropriate comment here, and begin script below
   if(g_form.isNewRecord()){
	g_form.setValue('urgency','3'); //change values of impact and urgency as per your priority lookup rules
	g_form.setValue('impact','3');
	g_form.setValue('priority','3');
   }


}

 

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

 

View solution in original post

4 REPLIES 4

Saloni Suthar
Mega Sage
Mega Sage

Hi Arun,

Are you specifically looking to set the priority to 3-Moderate when someone clicks on the New Incident button? or is it going to take effect throughout the platform?

 

You can find the configuration for New Incident/New Change Request in the chrome_tab UX Page Property.

 

Replace the instance-name with your instance name or follow the steps below: https://instance-name/sys_ux_page_property.do?sys_id=df0c9cb97340301045216238edf6a785&sysparm_record...

 

  1. Navigate to All > Now Experience Framework > Experiences.
  2. From the list of UX applications, select Service Operations Workspace.
  3. On the UX Application form, from the UX Page Properties related list, select the chrome_tab property.

 

 


If my response helped you, please click on "Accept as solution" and mark it as helpful.
- Saloni

Hi Saloni,

Thanks for your response.

Yes, i want to set the priority to 3-Moderate when someone clicks on the New Incident button. Don't want this to effect on native UI. This change should only be applicable if someone creates incident on SOW.
The chrome_tab is just giving the details of the tabs but where we can find the place where the field values set.
For Ex. Priority is current set as 4-Low as per OOB. I just wanted to change it to 3-Moderate.

Chaitanya ILCR
Kilo Patron

Hi @Arun Kumar D ,

create a onload client script on incident table

with UI type =All

and uncheck the global and populate the view name = sow_new_record

 

ChaitanyaILCR_0-1749753106359.png

 

update the impact and urgency values as per your priority lookup rules

 

function onLoad() {
   //Type appropriate comment here, and begin script below
   if(g_form.isNewRecord()){
	g_form.setValue('urgency','3'); //change values of impact and urgency as per your priority lookup rules
	g_form.setValue('impact','3');
	g_form.setValue('priority','3');
   }


}

 

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

 

SC15
Tera Guru

Hello @Arun Kumar D ,

I was unable to see your screenshot but understood your request. Here is the solution proposed:

- Create a Client script, onLoad to achieve this result

Steps:

Open a 'new' incident form

Use the context menu (hamburger menu) and open Configure>Client Scripts

Select 'new' to open the client script form and enter the below code

Name: Add Priority 3
Table: Incident
Type: onLoad
Active: true
Global: true
script:
function onLoad() {
    g_form.setValue('priority', '3');
}
save
 
Now when you go and create a new incident, the priority by default will show up
as the one setup in this script. Try it!!!
 
Please mark this response as helpful and resolved, as this will help others to be aware f
of this solution who wants to know. Thanks