- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-01-2020 05:13 AM
Hello,
I have the following requirement.
I want to have a field on Service Portal's form, that is read only. It will contain a value but the end user can not change it.
Is this possible?Any ideas?
Solved! Go to Solution.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-01-2020 05:44 AM
Hi,
you can create onload catalog client script and
1) set the UI Type as Mobile/ Service Portal so that this script executes only for portal and not for native
2) Applies to Catalog Item - true
3) Catalog item - Select your catalog item
4) Type - onLoad
5) Applies on Catalog Item view - true
function onLoad(){
g_form.setReadOnly('city', true);
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-01-2020 05:44 AM
Hi,
you can create onload catalog client script and
1) set the UI Type as Mobile/ Service Portal so that this script executes only for portal and not for native
2) Applies to Catalog Item - true
3) Catalog item - Select your catalog item
4) Type - onLoad
5) Applies on Catalog Item view - true
function onLoad(){
g_form.setReadOnly('city', true);
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-01-2020 08:02 AM
Hi,
Any issue you are facing here?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-02-2020 12:25 AM
It works!!
Thank you so much. I appreciate it.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-01-2020 05:27 AM
If its a normal form, you can do this by Native UI Policy or Client Scripts. Make sure the Type field is All so that it works on backend(Native platform) as well as Service Portal.
Please Mark as ✅ Correct if this solves your issue and also mark ???? Helpful if it helps resolve your problem.
Thanks,
Saji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-01-2020 05:30 AM