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

Get details about parent account of contact

Hello,

 

My scenario is that I want to access contacts parent account (parentcustomerid) in order to then be able to access the sharepoint documents that's linked to the account and display them in a sub grid.

But the problem I encounter is that I can not even get the parent account via an entity list, fetchXml or odata. I can get the name and ID on the parent account via liquid but not further than that.

 

SharePoint is enabled and i've added Account entity in document management in D365.

 

Tested fetchxml:

 

<fetch>
  <entity name="account" >
    <attribute name="name" />
    <attribute name="accountid" />
    <link-entity name="contact" from="parentcustomerid" to="accountid" >
      <filter>
        <condition attribute="contactid" operator="eq" value="{{user.id}}" />
      </filter>
    </link-entity>
  </entity>
</fetch>

 

Entity list error

Test.png

 

If i try to specify the account id to an readonly entity form on a web page i get nothing. account-details/?id=<accountid>

ErikLm_2-1618995931202.png

 

I have a partner portal where we have a relationship between Account and Contact. Contacts are related to one Account.

Entity permission:

ErikLm_0-1618995818787.png

ErikLm_1-1618995863742.png

 

Does anyone know what might be the problem?

 

Best Regards,

Erik

2 REPLIES 2
Fubar
Solution Sage
Solution Sage

You are probably wanting your Scope on the Entity Permission for Account to be 'Account', or a 'Parent' from Contact -  Account (rather than Contact as the scope)

https://docs.microsoft.com/en-us/powerapps/maker/portals/configure/assign-entity-permissions#account...

ErikLm
Frequent Visitor

Hi @Fubar,

 

Thanks for responding, I've tried those two different scopes and even account scope set as Global but without success. It still show the same error message and in console it says, 

 

_services/entity-grid-data.json/f46b70cc-580b-4f1a-87c3-41deb48eb90d 500 (Internal Server Error)

 

ErikLm_0-1619071423070.png

 

I checked with odata and fetchXml and the result is empty/null with no errors, its just blank. So its hard to find what's the problem.

I have tried to just display the contacts of the Account and that works just fine so nothing wrong there, i just want to display the account details (account form) of the contacts (parentcustomerid) related to it.

 

Best Regards,

Erik

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Users online (1,349)