Thank you for your feedback.
Form temporarily unavailable. Please try again or contact docfeedback@servicenow.com to submit your comments.

Set Write Role for All Catalog Variables

Log in to subscribe to topics and get notified when content changes.

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 ) ; }    
 
 }
Feedback