cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KED
Frequent Visitor

Flow to set Dataverse fields to read only

Is there a Power Automate action to set Dataverse fields to read only? 

 

Use case: a flow with an Adobe Sign sends a PDF for signature, populating that PDF's fields with data from a Dataverse "Application" table. A second flow has a trigger upon that signature's status being signed, and writes the values of PDF fields filled in by the user back into the Dataverse "Application" table.

 

At this point, because the document was signed and the data in that document constitutes a permanent record, we need the corresponding data in Dataverse to be read only.  Do I have to resort to a workaround like creating a field called "IsSigned" and setting it to Yes when the document is signed, and having IsSigned set to Yes being the condition in a business rule to lock all of the fields in the Application table? (Of which there are over 60 - that would be a nightmare business rule). 

1 ACCEPTED SOLUTION

Accepted Solutions
EricRegnier
Super User
Super User

Hi @KED,

The out-of-the-box method to set a record as read-only is with the Status (statecode) and Status Reason (statuscode). Add a new Status Reason that's associated to the Inactive Status (best to use the classic solution explorer for this). Save all and Publish All. Then in Power Automate, you can set the row as inactive with the standard Update a row Dataverse action.

EricRegnier_0-1620264957120.png

Hope this helps!

 

View solution in original post

5 REPLIES 5
dpoggemann
Super User
Super User

Hi @KED,

 

Couple of things here...

1.  You could actually inactivate the record (bound action) if you want it to lock all fields as this will happen by default.

2.  The other approach you mentioned is what I would do if there were a limited number of fields that need to be locked on the entity.  You can update this field through a Power Automate flow.

 

Hope this helps.  Please accept if answers your question or Like if helps in any way.


Thanks,

Drew

Hope this helps. Please accept if answers your question or Like if helps in any way.
Thanks,
Drew
EricRegnier
Super User
Super User

Hi @KED,

The out-of-the-box method to set a record as read-only is with the Status (statecode) and Status Reason (statuscode). Add a new Status Reason that's associated to the Inactive Status (best to use the classic solution explorer for this). Save all and Publish All. Then in Power Automate, you can set the row as inactive with the standard Update a row Dataverse action.

EricRegnier_0-1620264957120.png

Hope this helps!

 

@EricReigner I want to use custom Processes (Actions and Workflows) to set the Status Reason. I am finding that Status Reason is not available as a field to set in the Update Record action. I have Status Reason placed and visibleon all main forms. Is there some reason why Status Reason cannot be updated?

 

The only way to set it appears to be with a Business Rule.

dpoggemann
Super User
Super User

Hi @LenC ,

 

Please use the "Change Status" in the workflow to change the status vs. doing in Update Record.

Screen Shot 2022-03-26 at 3.58.37 PM.png

Hope this helps. Please accept if answers your question or Like if helps in any way.
Thanks,
Drew

You may have just made my working weekend 😆

 

Thanks!

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (3,484)