Hide some incident 'Resolution code' values from being visible for a customer.

Viskop_KP
Kilo Guru

Hi everyone,

 

Against Incidents I need to hide four 'Resolution code' values from 1 of the 20 companies we provide IT services to.

Any assistance is Super highly appreciated.

1 ACCEPTED SOLUTION

John VanBruggen
Giga Guru

Hi there.

Your best bet is going to use a client script to evaluate the caller's company and then remove the option.  I have one option being removed, though you would add the others in the same manner as I added the one, with additional lines of code.

I walk through this below.

Here is the code I show in the video.  Remember, I am only showing the onChange script.  You will also wan an onLoad script with similar logic.

 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
    if (isLoading || newValue === '') {
        return;
    }


    //ACME Africa
    if (g_form.getValue('company') == '86c1f3193790200044e0bfc8bcbe5d95') {
        g_form.removeOption('close_code', 'Closed/Resolved by Caller');
    } else {
        g_form.addOption('close_code', '6','Closed/Resolved by Caller');
    }



}



Check out my Consultant's Survival Guide
https://youtube.com/watch?v=zYi8KhP9SUk

View solution in original post

4 REPLIES 4

Allen Andreas
Administrator
Administrator

Hello,

Do you mean hide the 4 options so that they can't choose them or what do you mean? Like the caller if they're from 'x' company don't allow the technician to pick 4 values or if they're working the incident don't let them see 4 values if from 'y' company...

This could mean a few things...try to give more details please...

Please mark reply as Helpful, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hi,

Glad you got an answer that works for you. As mentioned above, if you don't mind, in the future, please try to give more information so we aren't speculating.

Take care!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

John VanBruggen
Giga Guru

Hi there.

Your best bet is going to use a client script to evaluate the caller's company and then remove the option.  I have one option being removed, though you would add the others in the same manner as I added the one, with additional lines of code.

I walk through this below.

Here is the code I show in the video.  Remember, I am only showing the onChange script.  You will also wan an onLoad script with similar logic.

 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
    if (isLoading || newValue === '') {
        return;
    }


    //ACME Africa
    if (g_form.getValue('company') == '86c1f3193790200044e0bfc8bcbe5d95') {
        g_form.removeOption('close_code', 'Closed/Resolved by Caller');
    } else {
        g_form.addOption('close_code', '6','Closed/Resolved by Caller');
    }



}



Check out my Consultant's Survival Guide
https://youtube.com/watch?v=zYi8KhP9SUk

Thank you sir, that worked 100% correct. 🙂

 

Much appreciated.

 

Thanks.