cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DChrisPhillips
Helper I
Helper I

How do I update CDS Contact entity _parentcustomerid_type and _parentcustomerid_value

Hi Folks,

 

I have automatically created an app using the CDS Contact entity as my data source resulting in the typical 3-screen phone app. Once the app was created, I added the Account entity as an additional data source and created a collection of each of the entities.

 

The Contact entity has a Many-to-one relationship with the Account entity. The field name on the Contact entity is _parentcustomerid_value with a field type=String and its display name is Company Name.

 

On my Contact entity collection, I can see _parentcustomerid_value and _parentcustomerid_type and it would appear from sample data on my trial environment that _parentcustomerid_type must equal either "account" or "contact".

 

My question is, how do I update these fields in the Contact entity, so that records are associated with their respective company in the Account entity? I've been unsuccessful in all my attempts to update my collection or the entities.

 

Here is an example of what I've been attempting (I only have two records in the Contact entity and they have separate last names, so I've explicitly filtered the one-and-only "Phillips" for simplicity sake):

Patch(colContacts, First(Filter(colContacts,lastname = "Phillips")),{_parentcustomerid_type: "account"})

 

My apologies if this is covered elsewhere in the PowerUser community KB. I am fairly new to PowerApps. However, in my fairly limited testing, I have had some good success creating one-to-many relationships with SharePoint lists I just don't want to go down the path of warehousing my Account/Contact data in SharePoint.

 

Please advise. Thanks!

 


CDS-Contact-Entity---Collection.png

 

PowerApps Version: 3.18042.26

11 REPLIES 11

Any update on the CDS Customer (or Account) funcationality?  I am trying to filter a Gallery of Contacts based on a Drop Down control of Accounts.  My two CDS entities (Contacts and Accounts) have a relationship and in Dynamics the Account is an available field for the Contact Entitiy, but the Account field is not available for any control that has Contacts as the data source in PowerApps.  All I am trying to do is get a list of all contacts associated with a specific Account.  Why is this so hard and what am I missing?

Hello - 

Take a look at this blog as it has the details on how you can use these customer fields within your application: https://powerapps.microsoft.com/en-us/blog/owner-customer-and-regarding-for-canvas-apps/

 

Hope this helps!


Brandon

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (3,429)