Veron F
Veron F

Reputation: 1

Based on condition Disable Field/Remove addresscomplete pca control from dynamics crm field

I am using addresscomplete pcf control on a single line text field 'Address' enter image description here

I want to disable addresscomplete conditionally. For e.g. if Age < 18 disable addresscomplete on field Address.

I tried disabling the field Address using javascript but it is still allowing search in the field.

Upvotes: 0

Views: 81

Answers (1)

Andrew Butenko
Andrew Butenko

Reputation: 5446

In order to enable/disable control based on some client-side logic you have to handle it in the code of your control. In order to react on client-side enabling/disabling you should bound disabled property of your component to context.mode.isControlDisable of the context of your PCF control.

Upvotes: 0

Related Questions