Remove the Read only fields

servicenow lath
Tera Contributor


Additional Information field should not be in Read only in moitor state 

 

1 ACCEPTED SOLUTION

BharathChintala
Mega Sage

@servicenow lath 

There is OOB write acl  which allowing all fields to be editable only in draft and assess states only.

 

Create ACl like below and write below client script or simple UI policy also works

BharathChintala_0-1682326739434.jpeg

 

BharathChintala_1-1682326739409.jpeg

 

 

If my inputs have helped with your question, please mark my answer as accepted solution, and give a thumb up.
Bharath Chintala

View solution in original post

3 REPLIES 3

Amit Gujarathi
Giga Sage
Giga Sage

Hi @servicenow lath ,
I trust you are doing great.

To ensure that the Additional Information field is not read-only in monitor state in the Risk Register table, you can follow these steps:

  1. Navigate to the Risk Register table in ServiceNow.
  2. Click on the "gear" icon in the top right corner of the screen to access the table configuration menu.
  3. Select "Configure > Form Layout" from the menu.
  4. Locate the "Additional Information" field on the form and click on the edit icon (pencil) next to it.
  5. In the field properties dialog box, uncheck the "Read only" checkbox.
  6. Click on the "Save" button to apply the changes.

 

// Get a reference to the Risk Register table
var riskRegisterTable = GlideRecord('rm_risk');

// Query for records in monitor state
riskRegisterTable.addQuery('state', '=', 'monitor');

// Loop through the results and update the Additional Information field
riskRegisterTable.query();
while (riskRegisterTable.next()) {
  riskRegisterTable.setValue('additional_information', 'New value');
  riskRegisterTable.update();
}
​

 


Was this answer helpful?


Please consider marking it correct or helpful.


Your feedback helps us improve!


Thank you!


Regards,


Amit Gujrathi



@Amit Gujarathi Where do i need to write this script ? in BR  or anything else ?

BharathChintala
Mega Sage

@servicenow lath 

There is OOB write acl  which allowing all fields to be editable only in draft and assess states only.

 

Create ACl like below and write below client script or simple UI policy also works

BharathChintala_0-1682326739434.jpeg

 

BharathChintala_1-1682326739409.jpeg

 

 

If my inputs have helped with your question, please mark my answer as accepted solution, and give a thumb up.
Bharath Chintala