- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2017 06:51 AM
We have an emergency change req ticket that needs the state to be changed from 'work in progress' to 'closed complete'. That list choice is grayed out even to me with a systems admin role. I have verified that the workflow on this req has completed, the post implementation ctask is closed, the req closure status is 'completed' and that the final step in the workflow before 'end' is a 'set value' '3 (which is closed complete in our system)'. For some reason, the workflow completed without actually setting the state field value to 3. The only documentation I can find is how to change the label for the field or the choices for the field, I cannot find any documentation on how to manually change the value to one that is inaccessible i.e. 'grayed out'.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2017 07:43 AM
Thank you all for your suggestions. Changing UI actions, etc in PROD just to set a field value in a single record is not a method I would care to employ due to our change management policies.
The Javascript runner is a useful utility, but unfortunately in this case it did not change the value.
One of my coworkers showed me the process for making these types of changes using the REST API Explorer, it is the only way to connect to a specific record in the database tables to change a read only field value since we do not have direct access to the tables themselves. Employing the REST API Explorer (PUT) method successfully changed the value.
Launch REST API Explorer
Select method (Get, Put, etc.)
Select Table
Enter sys_id
Scroll to bottom and click 'Add a field'
Select field to change
Enter change value
Click 'Send'
This process did not require me to modify anything in the instance, took less than a minute, and changed the value.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2017 06:56 AM
Hi Clay,
If the field is grayed out, it may be forced to read-only at the dictionary level. It doesn't matter if you have admin access, someone defined that field as off limits for manual editing. The intent in such cases is that business rules, UI actions, or workflows maintain it automatically. It sounds like some of that automation may have an issue somewhere that requires investigation.
As a "fix", you might want to consider a 'back door' for admins only to remediate this.
Create a UI action (perhaps a button, perhaps a form context menu) called "Close (admin only)", for example.
The condition would be like this: current.active && gs.hasRole('admin')
Only allow admins to use this on active records.
The script:
current.state = 3;
current.update();
action.setRedirectURL(current);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2017 06:57 AM
Hi Clay
Press CTRL, Shift, ALT and J together. Then in javascript runner run the below code
g_form.setReadOnly('state',false).
Regards
Ujjawal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2017 07:01 AM
Good idea, but limited to fields set read-only by client scripts and UI actions only. If it's an ACL or dictionary setting, it won't work.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2017 07:06 AM
Right Chuck in that case it will not work I am assuming that ACL or dictionary setting are not restricting here.