Unable to set caller field readonly with setReadOnly()
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
function onLoad() {
//g_form.setReadOnly("description", true);
//alert(g_form.isReadOnly("description"));
//g_form.setDisplay("short_description", false);
g_form.setMandatory("caller_id",false);
g_form.setValue("caller_id",g_user.userID);
g_form.setReadOnly("caller_id", true);
alert("done");
//g_form.setReadOnly("u_caller", true);
}
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello @SanjivaniLahane
SInce caller field is mandatory,
you need to have value and then make mandatory false after that make read only.
Please use below steps
g_form.setValue("caller_id", g_user.userID);
g_form.setMandatory("caller_id", false);
g_form.setReadOnly("caller_id", true);
Please mark if I have answered you