Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Not able to enable the subgrid for the Read only user

Posted on by 10

Hi, 

We have a requirement where in a read only user can access tree structure PCF control embedded on the subgrid on an entity form. Through JS we are trying to make the setdisabled to false for a subgrid  ( formContext.getControl("View360PCFExplorer").setDisabled(false) ) . As JS runs in user context even though the setdisabled line is executing changes are not reflecting on the form. We dont to want to increase the entity level write permissions for a read only user. Tried impersonation in JS that didnot worked.

pastedimage1606746656915v1.png        pastedimage1606746766806v2.png

  • Suggested answer
    RE: Not able to enable the subgrid for the Read only user

    It seems by design because the method setDisabled=false is not design to work if the user doesn’t have the privilege to update that record, which is expected because if the record is ‘read only’ for that user, is not expected that the user has the privilege to manipulate access into the field in the UI.

    To confirm this behavior you can test with an User containing only READ privilege against this Entity record, try to run setDisabled= false against a simple text Field, for example.

    Result: It will not work, the field will continue inaccessible/"read only" in the UI;

    Performing same test with an User containing a Security Role with full  privileges against this Entity record, when we run setDisabled= false against a simple text Field, it will work, and the field will become accessible in the UI;

    You will verify the same behavior for the Grid View360PCFExplorer, when you test it with an User containing only READ privilege against this Entity record, setDisabled=false will not work there either, as expected. Hence View360PCFExplorer will remains as ‘read only’ in the UI, not allowing the User to click/access the control, exactly as can be verified in a simple text field.

  • Roma Gupta Profile Picture
    Roma Gupta 725 on at
    RE: Not able to enable the subgrid for the Read only user

    Hi

    If that's a read only user, could you not even elevate permission for sub-grid table/entity ?

    Regards

    Roma

  • RE: Not able to enable the subgrid for the Read only user

    Hello Prasanna,  

    You will have to add the user in a access team and provide the correct privilege to that team.  

    Could you please try this and see if it is working?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans