Set Write Role for All Catalog Variables

This script sets a write role of Admin for all catalog variables in the system.

Name: Set Write Role for All Catalog Variables

Type:

Table:

Description: This script sets a write role of Admin for all catalog variables in the system.

Parameters:

Script:
pat( ) ;
 
 function pat ( ) { 
 
    var gr  = new GlideRecord ( 'item_option_new' ) ; var count  = 0 ;
  gr. query ( ) ; while (gr. next ( ) ) {
      count  = count  + 1 ;
      gr. setValue ( 'write_roles' , 'admin' ) ;
      gr. update ( ) ;
      gs. print ( "UPDATED ROLE # " + count ) ; }    
 
 }