How can I modify value in read only field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2017 04:16 AM
Hi,
I have one question. I have created Script Actions and in this scipt I need to modify value in field. But this field is change by Data policy (it has set Read only on "false").
If I print into the log value of this field from the script, then value is empty.
Is possible to change this value?
Thank you, so much.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2017 07:23 AM
Hi Petr,
I suspect the issue is somewhere else. GlideRecord operations don't care about dictionary entries being read-only, ACLs, or data policies.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2018 05:44 AM
Hello chuck,
what is the script we can use can suggest me. can you please help me
To fill all the read only fields for CI Structure – Class write a “before” business rule which runs on insert and update (to fill all the field best way is to use JavaScript in business rule)
Requirement 1:
- The business rule should only run if field “Table Name” changes
- The read only field should be filled with information from selected value in field “Table name” (you must select the referenced table entry to get the information)
- Field “Name” should be filled with the “label” from selected Table
- Field “OOTB” should be set to true if selected table is an out of the box table and to false if the selected table is not an out of the box table. (For this you can check if name value of table starts with “u_” or not)
- Field “Technical Name” should be filled with the “name” from selected Table
- Field “Parent Class” should be filled with the “super_class” from selected Table
- Field “Parent Class Technical” should be filled with the “super_class.name” (dotwalking) from selected Table
- Field “Create Date” should be filled with the “sys_created_on” from selected Table
Requirement 2:
- To fill all the read only fields for CI Structure – Attribute write a “before” business rule which runs on insert and update (to fill all the field best way is to use JavaScript in business rule)
- The business rule should only run if field “Field” changes
- The read only field should be filled with information from selected value in field “Field” (you must select the specific dictionary entry for field to get the information)
- Field “Name” should be filled with combination of Table Name.Field name (eg: u_cmdb_sap_system.description)
- Field “OOTB” should be set to true if selected field is an out of the box field and to false if the selected field is not an out of the box field (For this you can check if element value of dictionary starts with “u_” or not)
- Field “Technical Name” should be filled with the “element” from selected Dictionary
- Field “Type” should be filled with the “internal_type” from selected Dictionary
- Field “Length” should be filled with the “max_length” from selected Dictionary
- Field “Default” should be filled with the “default_value” from selected Dictionary
- Field “Inherit” should be filled with true if the field is inherited from super class and should set to false if the field is not inherited from superclass
- Field “Field Definition Class” should be filled with the label of class where the field is defined
- Field “Field Definition Class Technical” should be filled with the database name of class where the field is defined
- Field “Create Date” should be filled with the “sys_created_on” from selected Dictionary
- Field “Function Field” should be filled with the “function_field” from selected Dictionary
- Field “Read only” should be filled with the “read_only” from selected Dictionary
- Field “Mandatory” should be filled with the “mandatory” from selected Dictionary

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2018 05:48 AM
I recommend posting this to a new thread to get more visibility and hopefully more help. I don't think I will have time in the near future to read through all this, digest it, and provide you with a solution. Sorry.