I have one HTML webresource on the custom entity form. There is one lookup on the form called Language with value 'English'. On click of one button in that HTML page, ifsome conditions are not satisfied, I'm setting the Language lookup to null as below code and hiding that lookup.
Xrm.Page.data.entity.attributes.get("new_language").setValue(null);
And again onclick of the same HTML button, if some conditions are satisfied, I'm displaying that Language lookup and the value in that lookup is obviously null as we already set it to null. Then I'll select the value in Language lookup as 'English'.
The issue is, the OnChange event registered on Language lookup field is not triggering and when I access the Language field value from javascript, its showing null. But its trigger the OnChange event and getting lookup value if I select the Language other than 'English'.
Please help me whats wrong in this scenario..