Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Answered

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?

 

  • LeeHarris Profile Picture
    1,026 on at
    Re: How to Access EntityReference?

    Hi @a33ik 

    This was exactly what I was after. Much appreciated.

     

  • Verified answer
    a33ik Profile Picture
    3,304 Most Valuable Professional on at
    Re: How to Access EntityReference?

    Hello,

    You can use following code:

    let entityId = (<any>context.mode).contextInfo.entityId;
    let entityTypeName = (<any>context.mode).contextInfo.entityTypeName;

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 55 Most Valuable Professional

#2
mmbr1606 Profile Picture

mmbr1606 42 Super User 2025 Season 1

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 31 Super User 2025 Season 1

Overall leaderboard