Show alert in Red when priority is P1

Naveen87
Tera Guru

Hi Guys. 

 

I need to show an alert when Priority is 1.

Which depends on Impact and Urgency..

 

Wrote a UI policy on condition.

Impact is Customer (Customer value is 1)

Urgency is Today (Today value is 1). 

Excute if True. wrote an alert. 

But it's not reflecting on form. Please suggest.

1 ACCEPTED SOLUTION

AbhishekGardade
Giga Sage

Hello Naveen,

Use onChange Client Script: Remove isLoading Part from script so it will run on form load and field change as well. 

Make sure that your onChange client script is on Priority field. Add below code :


function onChange(control, oldValue, newValue, isLoading, isTemplate) {

var priority = g_form.getValue('u_priority');
if (priority == "1") {
var confirmed = confirm("Are you sure you want this to be Priority 1?");
if (confirmed == false) {
return false;
}
}
}
Please mark as Correct Answer and Helpful, if applicable.
Thanks!
Abhishek Gardade
Hexaware Technologies

 

Thank you,
Abhishek Gardade

View solution in original post

6 REPLIES 6

Hi Abhishek, 

 

Idk why , but it's not working.

Naveen87
Tera Guru

Hi Abhishek, 

 

As guided by u on call. Created a UI policy, 

On condition, 

Impact - is - A customer

Urgecny - is - Today.

 

Run UI on ALL.

wrote alert on script and it's working as excepted . 

 

Thank u so much.