Showing results for 
Search instead for 
Did you mean: 
New Member

Setting a pcf control to disabled (react component) in D365

Hi community,


is there a nice way to tell the control that it shall be disabled/editable than having a client-side script (addOnChange) and an additional input? I'm using pcf with react so would just have to pass a disabled state to the component.


We just came across a form on which all fields are locked if the form is in a specific state but none of the pcf are. The only solution that came into mind is the above mentioned but it's ugly and I guess there is no nice alternative because I need to tell the pcf somehow it needs to be disabled.


Thanks in advance and happy coding



Solution Sage
Solution Sage

The status of the field on the form is accessible via  the context.mode.isControlDisabled method. If it's set to true the PCF component should be in readonly mode - what that is for your control is up to you.

If this post has answered your question please consider it for "Accept as Solution" or if it has been helpful give it a "Thumbs Up".

Neat! Thanks.

Helpful resources

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!


Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (10,462)