Lookup field disabled error

Good day,
I have a lookup field and i want to disable it on load form, than on conditions it will be enabled. but i get error.



When i comment this code there is no error. i have this error in multiple forms..

Dear @ixxxl,
Please, try wrapping the code inside ready event for the lookup field:

fd.field('Linia').ready().then(function(field) {
    field.disabled = true;
});
1 Like

@Nikita_Kurguzov
Thank you, now it works, without errors

1 Like

Yes, please, use ready event for complex fields, such as Lookup/Person/Attachments - they take time to load, and this ensures their availability.