Restrict the Alternate Location Selections to Users With the 'itil_admin' Role
- On the Brother Network-Ready Printer Toner Catalog Item form, open the Toner Choices by Role Catalog Client Script you created in Lab 4.1
- Add statements to the existing script to also restrict the display of the California delivery? [ca_location] and Select a location outside of California for delivery [location_other] fields to users with the 'itil_admin' role
function onLoad(){ if(!g_user.hasRoleExactly('itil_admin')){ g_form.removeOption('pack_type', 'cym3'); g_form.removeOption('pack_type', 'cym6'); g_form.setDisplay('ca_location', false); g_form.setDisplay('location_other', false); } }
- Select Update