- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2024 01:23 AM - edited ‎08-20-2024 01:57 AM
Hi Team,
I require the a field to be editable in native view but should be read only in workspace view.
Please let me know How can we achieve This.
Thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2024 03:00 AM
Hi @Vamsi43
You can implement an UI Policy, making a field readonly for a specific view of a table. Sample below.
In case you'd like to implement a Client Script. Sample below
Cheers,
Tai Vu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2024 02:53 AM
Hi @Vamsi43 try below code . It will give you view names in client script. You can use onload client script
var view = getView(); //get viewname
if (view == 'workspace'){
g_form.setReadOnly('fieldname',true);
}
Regards,
Sid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2024 03:00 AM
Hi @Vamsi43
You can implement an UI Policy, making a field readonly for a specific view of a table. Sample below.
In case you'd like to implement a Client Script. Sample below
Cheers,
Tai Vu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2024 04:06 AM
Hi @Tai Vu
I'm trying write it form ui policy on business_unit table.
But there's no view values to lookup in "View" field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2024 11:26 PM
Hi @Vamsi43
OOTB the Business Unit [business_unit] table only has 1 default view. Have you defined a specific view for this table in the workspace?
If not, we should initiate a specific view first, which is applied within the workspace. E.g: Incident/Problem tables have the sow view in the Service Operation Workspace.
Cheers,
Tai Vu