How to make the custom field “Change Template” read‑only only in the SOW view
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
I am working on an SOW story and need guidance on configuring the Change Template field. My requirement is to make this field read‑only in the SOW view, while ensuring that it remains editable in the default Change form.
Could someone suggest the best approach to achieve this without impacting the default Change form behavior?
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago - last edited 2 hours ago
Hello @Angel k
Create UI Policy as shown below:
Execute if true:
function onCondition() {
alert(g_form.getViewName()); //comment this
if (g_form.getViewName() == 'sow') {
g_form.setReadOnly('u_change_template', true);
}
}
Execute if false:
function onCondition() {
if (g_form.getViewName() == 'workspace') {
g_form.setReadOnly('u_change_template', false);
}
}
Validation Results:
Service Operations Workspace:
Native UI:
Hope that helps!
