In a dataset PCF-control I need to check the create/update/delete privileges of the user on a specific entity.
For this I use this code:
const canCreate = context.utils.hasEntityPrivilege("account", 1, 0);
const canUpdate = context.utils.hasEntityPrivilege("account", 3, 0);
const canDelete = context.utils.hasEntityPrivilege("account", 4, 0);
In PowerApps this works fine, but in Portal/PowerPages I get the error "PCFNonImplementedError: hasEntityPrivilege: Method not implemented."
How to get the entity privileges of the user within a PCF-control on Portal/PowerPages?
And what is the best way in a PCF-control to check if it's in Portal/PowerPages or PowerApps? (checking if the browser-url ends with .dynamics.com?)