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

Dynamic creation of BU Team And add members

Hello,

I wanted to create a record via API in dataverse for each record there are group of people owned it.

How do I add people to a record dynamically while creation of record please?

Is this involves events, custom  Api, custom action? Please suggest 

2 ACCEPTED SOLUTIONS

Accepted Solutions

Hi @rampprakash 

Thanks for your response, I was trying to find how to do that, my questions are

1. How to create a team via code(may be API)

2.How to handle events on Dataverse, since the members of the team are based on the row record

 

Really helpfull if you share some guide /material to do it via code, please.

 

Thanks,

-Sendil M

View solution in original post

Hi @Sendil, Quick answers to your 2 questions:

  1. Here are a bunch of samples with C# and JS: https://github.com/microsoft/PowerApps-Samples/tree/master/cds/webapi
    You can find the desired CRUD operations. The concept is the same for teams where the table/entity plural name is "teams".
  2. The best out-of-the-box way to handle events is with Power Automate and the Dataverse connector: https://docs.microsoft.com/power-automate/dataverse/overview 
    If you absoleting want/need code, have a look at plugins: https://docs.microsoft.com/powerapps/developer/data-platform/write-plug-in 

Hope this helps!

View solution in original post

5 REPLIES 5
rampprakash
Super User
Super User

Hello @Sendil,

 

Create a Team and add users to the team.

Then on create of record using API pass the OWNER field as TEAMS as a logical name and GUID of team record.

 

Please mark as Answer if it is helpful and provide Kudos


Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
Blog : https://microsoftcrmtechie.blogspot.com

Hi @rampprakash 

Thanks for your response, I was trying to find how to do that, my questions are

1. How to create a team via code(may be API)

2.How to handle events on Dataverse, since the members of the team are based on the row record

 

Really helpfull if you share some guide /material to do it via code, please.

 

Thanks,

-Sendil M

Hi @Sendil, Quick answers to your 2 questions:

  1. Here are a bunch of samples with C# and JS: https://github.com/microsoft/PowerApps-Samples/tree/master/cds/webapi
    You can find the desired CRUD operations. The concept is the same for teams where the table/entity plural name is "teams".
  2. The best out-of-the-box way to handle events is with Power Automate and the Dataverse connector: https://docs.microsoft.com/power-automate/dataverse/overview 
    If you absoleting want/need code, have a look at plugins: https://docs.microsoft.com/powerapps/developer/data-platform/write-plug-in 

Hope this helps!

Sendil
Frequent Visitor

Thanks for your Response @EricRegnier 

 

To get more indepth of my need is

1. I wanted to create a row(record) using API via angular

2. Row will have a metadata like Manager, director

3. I wanted to give access to the record only those Manager, director as part of the Metadata of a

row.

 

Here my questions are,

1. I wanted to call API on user context in angular, do i need to pass user credential as part of acquiring access token?

2. Can i get dummy api url to create a team? Also, I wanted to assign or set that team as a owner for the newly created row

3. How do I add the Manager, director as part of the row as a member of the team?

Hi @Sendil, apologies for my late reply. To answer your questions:

  1. To acquire token have a look at this: https://docs.microsoft.com/powerapps/developer/data-platform/authenticate-oauth It has some exmaple and use those in your JS/TypeScript scenarios.
  2. Not sure I understand. You can create a team and assign users with the Web API. It you want to associate the newly created record user can use the Owner field. More info on the owner field: https://docs.microsoft.com/powerapps/maker/data-platform/types-of-fields . Security/access of records evolves around the owner field.
  3. See #2 above.

Cheers

  1.  

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Users online (2,592)