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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Users online (47,169)