cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mrstian89
Helper IV
Helper IV

Update row owner in Dataverse table

Hi!
I am creating an app where I keep track of equipment in several locations.

For each location I have 4 security groups (read / loan / maintain / admin).

 

I want to use PowerAutomate to give the different rows team owner dependent on a column value.

 

If Location column = Location 1, I want the four security groups from that location to own the row/record.

 

I have tried the following in Power Automate, but it fails:

 

When a row is added or modified

  • Equipment list table
  • Scope: Organization

Apply to each

  • Select an output from previous steps. I think this is the issue. I have tried using OData Id and the uniqe identifier of the table. I still get an error.
  • Condition: If Location column = Location 1, then Update row

Update row:

  • Row ID: Is it correct to use the table unique identifier?
  • Owners: I input the ID's of the security groups, separeted by commas.

 

I am obviously missing something at the beginning of the Apply to each step. But does the rest seem to be an OK way to solve this?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @mrstian89 

 

Follow the below steps:

 

Here I am checking the name is Location 3 as an example.  Next step I am getting the Team Id (Location 3). Finally setting the team id as the owner of the newly created record.

 

image.png

image.png

 

Thanks

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

View solution in original post

5 REPLIES 5
abm
Super User
Super User

Hi @mrstian89 

 

Not sure I understood correctly. After the trigger why do have a apply to each loop. So that means you are filtering something? Could you please post a screenshot of your flow? Also you haven't mentioned the error.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

My solution clearly didn't work, and I am probably not even close!

How can I accomplish the following:

  • Everytime a new row is added to the dataverse table, I want to change the owner of that row to specific team IDs.
  • If the value of the Location column is Location 3, I want that row to be owned my all Location 3 teams.
  • The same for my other locations. 

Hi @mrstian89 

 

Follow the below steps:

 

Here I am checking the name is Location 3 as an example.  Next step I am getting the Team Id (Location 3). Finally setting the team id as the owner of the newly created record.

 

image.png

image.png

 

Thanks

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

hi @abm this way was brilliant. I am following... but I get an error at the stage of adding the team as owner:

 

Principal team (Id=1069a4a5-9283-ec11-8d21-000d3a4b385c, type=9, teamType=0, privilegeCount=494), is missing prvReadkey_ProductCertification privilege (Id=727088e5-0198-4fa3-adf5-31e4faaf2ed9) on OTC=10291 for entity 'key_productcertification' (LocalizedName='Product Certification') in Business Unit: xxxxxxxxxx (Id=xxxxxxxxxxxxxxxxx). context.Caller=1ede5146-e71a-ec11-b6e6-6045bd8d2f2e. Or identityUser.SystemUserId=74ebd8af-3a26-4d5a-a735-6149c73e6d5b, identityUser.Privileges.Count=2950, identityUser.Roles.Count=0 is missing prvReadkey_ProductCertification privilege (Id=727088e5-0198-4fa3-adf5-31e4faaf2ed9) on OTC=10291 for entity 'key_productcertification' (LocalizedName='Product Certification').

 

Do you know what it might mean? I am thinking it means I have to add some permission to the security role associated with the table?

Hi @shavora 

 

Believe the error you are getting when you reading your entity key_productcertification. This means you need a security role for reading the entity. Check the security role and set the right permissions.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Helpful resources

Announcements
Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (1,796)