0

I have created a model driven PowerApps. There are two views created View1 and View2. View1 should be accessible to all users but users should not be able to edit records when opened through View1. Similarly, users with a specific role should be able to edit the records when opened through View2.

I checked through business rules present in the model-driven approach, but didn't find any solution.

Let me know in-case of any other alternatives for implementation of same.

Thanks,

RBK
  • 123
  • 1
  • 15
  • Are you talking about the views in dataverse like "Active Accounts", "My Active Accounts" ?? There is no supported way to achieve this. when a record is opened it does not have the context of which view it is opened from. You might want to rethink the business use case why such a requirement came through. They are going to see the same record in both views if filters match, then why can they edit sometimes but not edit sometimes? – Harinarayanan Jun 16 '23 at 08:20
  • There are two different users, where one role can only create and view, whereas one role can see that request and approve or reject. – RBK Jun 16 '23 at 09:45
  • There are many ways to achieve this, Role Requestor: Create & Read Privilege at User Level, these guys can create records and submit for approval. Role Approver: Read, Write Prvileage at User Level, these guys can approve the request that is submitted. Now Upon Submit to Approval, you can choose to either assign the record to Approver or Share the record with Approver via power automate. Now Approver can open the record and approve (additionally you can have role based form where approver role will have a form that has all fields read-only so he can only approve OR a JS to lock unlock fields) – Harinarayanan Jun 16 '23 at 10:10

1 Answers1

1

Forms doesn't have context of which views they are opened from, & whichever view they opened from as long as they have access to the record they can edit it.

There are alternate ways to achieve the actual user requirement,

  • Role Requestor: Create & Read Privilege at User Level, these guys can create records and submit for approval.

  • Role Approver: Read, Write Prvileage at User Level, these guys can approve the request that is submitted.

Now Upon Submit to Approval, you can choose to either assign the record to Approver or Share the record with Approver via power automate. Now Approver can open the record and approve.

(additionally you can have role based form where approver role will have a form that has all fields read-only so he can only approve OR a JS to lock unlock fields)

Harinarayanan
  • 375
  • 1
  • 9