Create a Catalog Client Script to Control the Display of Choices Based on Role

  1. On the Brother Network-Ready Printer Toner Catalog Item form, select New on the Catalog Client Scripts Related List
  2. Configure the record
  3. Name: Toner Choices by Role
    Type: onLoad
    
  4. Save the record, remain on the form
  5. Examine and write the script:
  6. function onLoad(){
        if(!g_user.hasRoleExactly('itil_admin')){
            g_form.removeOption('pack_type', 'cym3');
            g_form.removeOption('pack_type', 'cym6');
        }
    }
    
  7. Select Update

results matching ""

    No results matching ""