Complex scripts

Mustafeez
Tera Contributor

If user can select a caller able tutor and group "cab approval" such as not visible caller in assign to field?

5 REPLIES 5

Susan Britt
Mega Sage
Mega Sage

Hi Mustafeez,

 

I am not sure I understand the question or issue.  Where are you selecting "CAB Approval" for group - assignment group of a Incident or where?  The Assigned to should only show active users that are in the group you chose for the Assignment group.  The Caller can be any active user in the system.

Mustafeez
Tera Contributor

@Susan Britt Any suggestions on how to fix this, such as using the reference qualifier and script include? 

Susan Britt
Mega Sage
Mega Sage

What specifically are you wanting the result to be (i.e., what is your business requirement; e.g., needing an approval to go to the Caller)? If you are indeed talking about wanting to be able to select any user for the Assigned to on an Incident record, I would advise against this.  The itil role is required for being a fulfiller (i.e., Assigned to) in ITSM.  

I wrote these onLoad script but its not working, do you have any idea could you please help me out @Susan Britt 

 

function onLoad() {

    

    var callerField = g_form.getReference('caller_id', callerCallback); 

    var assignmentGroupField = g_form.getReference('assignment_group', groupCallback);

}

 

function callerCallback(callerField) {

  

    if (callerField && callerField.name == 'Sean Bonnet') {

        

        g_form.setDisabled('assigned_to', true);

    }

}

 

function groupCallback(assignmentGroupField) {

  

    if (assignmentGroupField && assignmentGroupField.name == 'CAB Approval') {

       

        g_form.setDisabled('assigned_to', true);

    }

}