getControl is not supported in service-portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2018 11:45 PM
I could see getControl is not supported in service-portal what we can use instead?
I am writing a client script to not to allow copy and paste in a catalog field.
for that I have written a client script:
eg:
var getField = g_fom.getControl('variable name');
getField.onpaste = function(e)
{
e.preventDefault();
};
}
it is working in classic view but not in service-portal.
can anyone please advice!!
Thanks in advance!!
Regards,
Mohammad Danish
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2018 12:04 AM
Hi Danish,
You may have a look in to a scenario, insights in this link may help you.
Link - getControl in Service Portals
Regards, Akash
If my response proves useful, please mark it "Accept as Solution" and "Helpful". This action benefits both the community and me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2018 12:50 AM
No, I tried this yesterday itself its not working as g_form.hasField() will return true/false and nothing else possible. 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2018 01:55 AM
Hi,
Check below link,
https://hi.service-now.com/kb_view.do?sysparm_article=KB0547171
Thanks,
Tripti S.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2018 12:42 AM
Hi Tripti,
I tried this also not working 🙂
Regards,
-Danish