web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Passing back another e...
Power Apps
Unanswered

Passing back another entity into Dynamics

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello. I'm new to this community but hoping someone will be able to help me resolve my issue. The app I'm creating purpose is just to add a contact from your outlook contacts to pass into dynamics.

 

I have a Contact (entity) that has their phone, email, etc. as well as their related Account (company name) pass back into the contact entity in Dynamics.

 

Question is, how can I pass back information for the new contact as well as their related company name back into the Contacts entity in Dynamics?

 

***See attachment for query results with no company name passed back in.***

powerapp.png
Categories:
  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    To better understand your issue:

    1. Do you want to pass back the company name of outlook contact to the company name field (Looked up form Account) of contact entity?

    2. Does the company name you want to pass back exist in the Account ?

     

    If the company exist in Account, please try the following formulas: to create a new contact. (gallery shows outlook contacts)

    Patch(Contacts,Defaults(Contacts),{'Full Name':Gallery.Selected.displayName,'Company Name':LookUp(Accounts,'Account Name'= Gallery.Selected.companyName)})

    If the company doesn't exist in Account, you need to create a Account firstly as below, and then refer to the above formula.

    Patch(Accounts,Defaults(Accounts),{'Account Name':Gallery1.Selected.companyName})

    Annotation 2019-09-24 155319.pngBest regards,

    Sik

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks so much for your time and response @v-siky-msft . However, it's still not working.

     

    It would be the first option, pass back the company name of outlook contact to the company name field (Looked up form Account) of contact entity.

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Is there any error shown in the formulas?

    The lookup field(compant name) you want to patch should be a record of Account entity, so use lookup function to find out the record which account name equals the contact's company name.

     

    Take the contact in your screenshot as an example, if you want to patch a company name to Zyzick Owens, you can try this:

     

    Patch(Contacts,LookUp(Contacts,'Full Name'="Zyzick Owens"),{'Company Name':LookUp(Accounts,'Account Name'= "Company Name")})

    Also if you want to create a new contact record, please divide it into two steps, first create the record ,then patch company name:

    Patch(Contacts,Defaults(Contacts),{'Last Name':"Contact Name"});
    Patch(Contacts,LookUp(Contacts,'Last Name'="Contact Name"),{'Company Name':LookUp(Accounts,'Account Name'= "Company Name")})

    Note: On my side, 'Last Name' is the required value,  "Contact Name" and "Company Name" need to be modified by you

     

     

    Hope this help.

     

    Best regards,

    Sik

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 139

Last 30 days Overall leaderboard