web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : w/72RqT8c5UPhtFMXPwjFH
Power Apps - Power Apps Pro Dev & ISV
Unanswered

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

Like (0) ShareShare
ReportReport
Posted on 24 Feb 2020 09:34:35 by

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

 

 

  • Community Power Platform Member Profile Picture
    on 24 Feb 2020 at 15:27:04
    Re: Setting a pcf control to disabled (react component) in D365

    Neat! Thanks.

  • Ben Thompson Profile Picture
    1,400 on 24 Feb 2020 at 13:01:18
    Re: Setting a pcf control to disabled (react component) in D365

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete