Forums

Forums / Developing Portals / Restricting the Edit button of a Grid or Sub-Grid View

Restricting the Edit button of a Grid or Sub-Grid View

4 posts, 0 answered
  1. Douglas Beebe
    Douglas Beebe avatar
    6 posts
    Registered:
    07 Jul 2020
    21 Mar 2023
    Link to this post
    I have a sub-grid with multiple approval records that I want all users to be able to see, but I want to restrict the edit button to only users who are assigned as "Approvers" of a particular record in the sub-grid.  The Approver is assigned as a lookup field in a Request For Approval entity in CRM. Can I accomplish this by customizing the template?  Alternatively, could I add a custom column that simulates an Edit option (perhaps as a hyperlink)?
  2. Tom Pawelec
    Tom Pawelec avatar
    25 posts
    Registered:
    21 Oct 2022
    23 Mar 2023 in reply to Douglas Beebe
    Link to this post
    Hi Douglas,

    One way to do this is you can add a condition to check if the user is an approver for the selected record and show hide the button using HTML code.

    Regards,
    Tom

  3. Douglas Beebe
    Douglas Beebe avatar
    6 posts
    Registered:
    07 Jul 2020
    28 Mar 2023 in reply to Tom Pawelec
    Link to this post
    Would this be logic inside the template?  Any examples of how to check the current user on that template?
  4. Tom Pawelec
    Tom Pawelec avatar
    25 posts
    Registered:
    21 Oct 2022
    04 Apr 2023 in reply to Douglas Beebe
    Link to this post
    Hi Douglas,

    You can perform this logic using the embedded code widget.

    Regards,
    Tom
4 posts, 0 answered