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

How to change owner field from SYSTEM to dynamics 365 user of a Contact added using Portal

When we add a Contact using Power Portal the default owner is "SYSTEM". I have a requirement to change the newly added contact's owner i.e. "SYSTEM" to the one with the owner of currently logged-in users, the owner of the logged-in contact is always going to be an office365 user. 

 

For implementing the same I have created an automated flow that triggers when a record is created and then updates the value of the owner. But the problem is I am unable to get the Currently logged-in user's owner detail in the flow. How can get the current login user's owner name in the flow

 

Furthermore, please do share any alternate solutions if any.

1 ACCEPTED SOLUTION

Accepted Solutions
OliverRodrigues
Super User II
Super User II

Hi, this video might help: https://www.youtube.com/watch?v=R_l_AXBJjxo

The owner will always be a system user, the idea is to create separate columns for Created By (Contact) 




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Apps Portals Super User


Oliver Rodrigues


 

View solution in original post

4 REPLIES 4
OOlashyn
Super User
Super User

Hi @pthakur ,

What you can do is create a new field called Modifed By Portal Contact or something similar. It should be a reference to the Contact table. Then when logged in contact creates another contact you can populate that field with Basic Form Metadata via Set on Save option. This will allow you to have a reference to contact that you can later use in the flow/workflow. Keep in mind that this approach cannot be used on the editing form if contact will update its own record - that will create an infinite loop and throw an error.

----------------------------------------------------
If you find this post helpful consider marking it as a solution to help others find it.
pthakur
Frequent Visitor

Hi @OOlashyn , thank you for responding. Using Created By Portal Contact column, I am able to get the logged-in user id but unable to get the Owner for the same user/contact. Can you please share how to do that? Can we do a lookup?

pthakur
Frequent Visitor

@OOlashyn,  I got what you meant in your reply I created Metadata for the entity Form as below but still, the Owner is always "system user". Am I missing something?

pthakur_0-1624887436324.png

pthakur_0-1624888239287.png

 

pthakur_1-1624887463148.png

 

OliverRodrigues
Super User II
Super User II

Hi, this video might help: https://www.youtube.com/watch?v=R_l_AXBJjxo

The owner will always be a system user, the idea is to create separate columns for Created By (Contact) 




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Apps Portals Super User


Oliver Rodrigues


 

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,082)