Ho to set Priority to High for VIP User

hongsok
Tera Contributor

Dear all,

I have a table that extend from Task table under Application Scope. I would like to set the Priority high when the requester is VIP.

I would appreciate you help. 

Regards,

Hong

1 ACCEPTED SOLUTION

Anish kumar
Kilo Guru

Hi hongsok

 

We can do this with business rule but business rule will work after you saved the form.

With client script once you change the caller and if caller is vip then immediately priority will be set to 1- High

 

so Create a Onchange Client script on Called field and add below code

 

find_real_file.png

 

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

if (isLoading || newValue === '') {

return;

}

var callerID = g_form.getReference('caller_id', setPriority);

function setPriority(callerID) {

if (callerID.vip == 'true') {

// Priority is depend on Imapct and Urgency.You need to set Impact and Urgency

g_form.setValue('impact', 1);
g_form.setValue('urgency', 1);

}
}
}

 

Kindly mark it correct and helpful if it solves your issue.

Thanks and Regards,

Anish kumar

View solution in original post

5 REPLIES 5

Subhojit Das
Kilo Guru

Hi Hongsok,

You can also try out with onChange Client Script using getReference().

Here is the code:

Name:<name of your choice>

Table:<Table name>

Type: onChange

Field name: Caller

Script:

var caller = g_form.getReference('caller_id');

if (caller.vip=='true') {

g_form.setValue('impact', '1');
g_form.setValue('urgency', '1');
g_form.setValue('priority', '1');

}

Regards,

Subhojit