Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Unanswered

Bug: "Disable" and "Enable" User ribbon buttons throwing errors on use

(0) ShareShare
ReportReport
Posted on by

Hi,

 

My environment is on server version 9.2.21102.00143 and client version 1.4.3458-2110.2.

 

In my test Power Apps environment, the uncustomized, out-of-box "Disable" and "Enable" ribbon buttons give me errors when I try to use them or inspect them with the Command Checker. Has anyone experienced a similar issue and/or can someone shed some light on a resolution?

 

For example, trying to use the Disable button on a user, it gives me the following console error:

"Main_system_library.js:1 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'OptionSet')
at Main_system_library.js:1
at app.js?v=1.4.3458-2110.2:715
at i (app.js?v=1.4.3458-2110.2:308)
at a (app.js?v=1.4.3458-2110.2:715)"

 

In that function, the OptionSet the code appears to be trying to read is the entity's 'statecode' attribute. I don't believe the systemuser entity has a statecode field - it uses the "isDisabled" / Status field for that purpose.

DrewMc_1-1637345449713.png

 

Additionally, trying to inspect this button through the Command Checker also throws an error. Attempting the view the Command Properties of either button with the Command Checker causes an error.

DrewMc_2-1637345785612.png

"react_devtools_backend.js:2540 TypeError: Cannot read properties of null (reading 'toString')
at rr._renderRulePartProperties (175.js?v=1.4.3458-2110.2:formatted:3141)
at 175.js?v=1.4.3458-2110.2:formatted:2873
at Array.forEach (<anonymous>)
at rr._renderRulePartsAsListOrAccordions (175.js?v=1.4.3458-2110.2:formatted:2860)
at 175.js?v=1.4.3458-2110.2:formatted:2836
at Array.forEach (<anonymous>)
at rr._renderAllRulesAccordions (175.js?v=1.4.3458-2110.2:formatted:2806)
at rr.render (175.js?v=1.4.3458-2110.2:formatted:2800)
at Ua (vendor.js?v=1.4.3458-2110.2:9)
at Ha (vendor.js?v=1.4.3458-2110.2:9)"

DrewMc_4-1637346069039.png

 

The reason for this error is because there appears to be no PrivilegeId associated with an "Osdp" miscellaneous privilege, but the function is attempting to use .toString() on a null value.

DrewMc_3-1637345991017.png

 

 

I have not made any customizations to these buttons - the errors occur with the buttons as they are, out-of-the-box.

 

Interestingly, removing the display rule that checks for the Osdp privilege ("Mscrm.IsNotOsdp") causes the Enable and Disable buttons to no longer display. A separate enable rule ("Mscrm.AppCommon.DoNotShowOnControlPage") returns False for the Disable and Enable buttons. This is confusing because I cannot understand why the buttons would display (i.e. "DoNotShowOnControlPage" is returning True) with the "IsNotOsdp" rule, but "DoNotShowOnControlPage" is returning False without the "IsNotOsdp" rule.

 

Could the "IsNotOsdp" rule be causing an error when evaluating when the buttons' display rules, and those buttons are not functioning because they should not be available on the systemuser grid ribbon?

 

Thanks

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 87 Most Valuable Professional

#2
mmbr1606 Profile Picture

mmbr1606 71 Super User 2025 Season 1

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 65 Super User 2025 Season 1

Overall leaderboard