Hi,
I don't manage to set my Lookup entity field to Read-Only mode on my form... Even if I clicked on "Field is read-only", then "Save" and then "Publish". How can I do that please ?
Regards,
Camille
*This post is locked for comments
$('#can_reportedbycontact').attr("readonly","readonly");//lookup field
$('#can_reportedbycontact').parent().find('.input-group-btn').hide();
Hi,
Indeed, this error is due to custom code.
I think this is this code that block me from making this field read only.
Thank you all for your help
Regards
Camille
Hi ,
The error is coming from different function called Disableddivision. Please check in the function some control is getting null. So you need to do null check and then getValue from control.
Hi Goutam,
I tried this javascript but I get this error, even after removing it, after clearing cache and even after removing the fiel from my form :
Could you help me removing it please ?
Thank you & regards,
Camille
Hi Camille,
It should work. Can you give a try publishing all solutions and try in Private or Incognito mode in the browser. Just to make sure caching is not causing the issue. Also try on a different lookup field for a test.
Thanks
Justin Jose
Hi Camille,
Silly question, but might be worth asking, did you refresh your main page browser AFTER you published the changes?
Publishing any changes on any entity does not show up on an entity page until it is either refreshed or reopened.
Hi Camillie,
Ideally its should work , not sure I am assuming some other customization making the field unlock. Try to create one business rules or may be use javascript in the onload method see how its behave.
function FieldDisable() { Xrm.Page.getControl("lookupFieldName").setDisabled(true); Xrm.Page.getAttribute("LookupFieldName").setSubmitMode("always"); }
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,232 Super User 2024 Season 2
Martin Dráb 230,064 Most Valuable Professional
nmaenpaa 101,156