- 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 01:48 AM
Hi @Vamsi43
Not a good way, UI policy work on Global or specific view only.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2024 01:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2024 02:08 AM
Might be via some script but it is not recommended and you will add a loophole in system.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2024 04:17 AM
I got the below client script code from the community. which is not working
can you pls help me with the adjustment where i'm not this script on business_unit table
function onLoad() {
//Type appropriate comment here, and begin script below
var url = top.location.href; // getting the URL Link
var pathname = new URL(url).pathname; // getting the Path workspace : now/risk/, Native :now/nav/ui/.
pathname = pathname.split('/');
var ur = pathname[2];// getting if its a workspace or native
if ( ur == 'nav') {
g_form.setReadOnly("name", false);// editable for UI 16
}
else{
g_form.setReadOnly("name", true);// Read only for SOW Workspace
}
}
}