dynamically change priority field on basis of assignment group.

sarabjeet
Giga Expert

Hi everyone,

I am trying to set default priority as P4 for a particular assignment group. And I am able to achieve(onsubmit client script) so but if i try to change that the priority in the next step it is not allowing me to do this. For example the default is P4 and i try to change it to P2 and save it doesn't happen. 

Please let me know how can i achieve this requirement.

Thanks,

Sarabjeet

1 ACCEPTED SOLUTION

Murthy Ch
Giga Sage

@sarabjeet 

When you are updating the priority to P2 still it is saving to P4?

If yes its because of your onSubmit() client script

So please use this:

if(g_form.isNewRecord())
{
var a = g_form.getValue('assignment_group');
if (a == 'a56f4cbfdb252410b9450342f396191c') {
g_form.setValue('impact', '14'); // low
g_form.setValue('urgency', '11'); // low
}
}

Thanks,

Murthy

Thanks,
Murthy

View solution in original post

6 REPLIES 6

Prasad Pagar
Mega Sage

Hi @sarabjeet 

Instead of doing it via OnSumbit client script, Did you tried using BR or Data lookup?

What is your current client script code?

Thank you
Prasad

Hi Prasad,

PFB the code i used.

var a = g_form.getValue('assignment_group');
if (a == 'a56f4cbfdb252410b9450342f396191c') {
g_form.setValue('impact', '14'); // low
g_form.setValue('urgency', '11'); // low
}

Could you please guide me how to achieve this with BR

Client Script put extra load on Browser and impacts performace. BR will do it without script.

find_real_file.png

 

find_real_file.png

Give a try 😉

Prasad,
What is the script screenshot?  I see the advance box checked but no screenshot for the script.  Please include the script.  Thank you