getControl is not working in Service Portal
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2025 08:47 AM
Hi All,
I have a field called -"Start Date" of type 'Date' on the catalog item. The requirement was to make the field read only so that the user can make use of Calendar and do not enter the date manually. So, I have written a onLoad catalog client script to make it readOnly.
g_form.getControl('start_date').readOnly=true;
This script works for the Desktop view but doesn't work in the service portal. Can anyone suggest some logic which can work on both UI Type.