unlock URL field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â02-14-2020 05:42 AM
Hi All,
I am trying to unlock URL field but i am not able to do.
I wrote onLoad() client script
Table name: u_documents
Field name: u_url
var data = g_form.getValue('u_url');
var unlockControl = g_form.getControl('u_url_unlock');
alert(unlockControl);
//Set its onclick method
unlockControl.onclick = unlockClick;
alert(unlockControl.onclick);
}
function unlockClick() {
g_form.setDisplay('short_description', false);
unlock(this, 'u_documents.u_url','u_documents.u_url_edit', 'u_documents.u_url_nonedit');
}
But this one not working.
Please help.
Thanks in advance
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â02-14-2020 02:34 PM
Please go to the 'System Properties' -> 'UI Properties' and find the below to Check the check box.
'Unlock empty URL fields on form load' (glide.ui.unlock_empty_url) â Controls the default lock behavior of all empty URL fields on form load.
Useful Link: Lock/Unlock glide_list and URL Fields With Client Scripts - ServiceNow Guru
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â02-16-2020 11:41 PM
Hi Sachin,
I am quite new in servicenow.
Thank you for your reply but as i know when i go through 'System Properties' -> 'UI Properties' then this apply for all.
But i want only for my table " u_documents".
I wrote this piece of logic in client script and this work but now i got one more new issue.
unlock(this, 'u_documents.u_url', 'u_documents.u_url', 'u_documents.u_url_link');
When i use this then it able to unlock url but on page it will show 2 icon.
As you can see in this attachment.