Display Business Rule

ShiningStar1
Tera Contributor

Hello All,

 

Hello All,

Kindly help me with the below requirement,

If User is securonix admin.

impact=1

urgency =1

Priority = High

If impact =2

urgency = 2

Priority = Low

I have written a display business rule for it, but it does not work:

function executeRule(current, previous /*null when async*/) {

    if (current.impact == 1 && current.urgency == 1 && current.caller_id.user_name == 'securonix admin'){

current.priority = 1;

})(current.previous);

 

Please help me with the script as it doesnot work .

15 REPLIES 15

James Chun
Kilo Patron

Hi @ShiningStar1 ,

 

Unsure about the requirement but I assume if those conditions are met, you need to update the priority?

If so, instead of writing a display Business Rule, you should use either a before Business Rule (insert and update) and/or an onChange Client Script.

 

Thanks

Hi James,

Thank you for your reply .yes correct if the conditions are met we need to update the priority but On change client script did not work .Could you please help with the script .

 

 

No worries, please share the script you have written so far and I can help you from there.

Hi James ,

 

Here is the script below :

 


    if (getimpact == '1' && geturgency == '1' &&    caller_id.role == 'securonix_admin')

    {
        g_form.setValue('priority', '1');
 
Not sure about caller_id.role if that is correct. Kindly help.