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.
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.
"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)"
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.
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
WarrenBelz
87
Most Valuable Professional
mmbr1606
71
Super User 2025 Season 1
Michael E. Gernaey
65
Super User 2025 Season 1