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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to Access EntityRe...
Power Apps
Unanswered

How to Access EntityReference?

(0) ShareShare
ReportReport
Posted on by 1,026

Hi,

I have created a component which I have bound to a field on a form within Dynamics 365. I was trying to get the current record id and found documentation on the EntityReference object here https://docs.microsoft.com/en-us/powerapps/developer/component-framework/reference/entityreference

 

However, I'm struggling to find samples of how to pass this into my component so that I can access the record id? Has anyone got the steps necessary to get this implemented?

 

I have the same question (0)
  • Verified answer
    a33ik Profile Picture
    3,306 Most Valuable Professional on at

    Hello,

    You can use following code:

    let entityId = (<any>context.mode).contextInfo.entityId;
    let entityTypeName = (<any>context.mode).contextInfo.entityTypeName;
  • LeeHarris Profile Picture
    1,026 on at

    Hi @a33ik 

    This was exactly what I was after. Much appreciated.

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard