Announcements
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?
Hello,
You can use following code:
let entityId = (<any>context.mode).contextInfo.entityId; let entityTypeName = (<any>context.mode).contextInfo.entityTypeName;
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 358 Most Valuable Professional
11manish 214 Super User 2026 Season 2
Mohsin Ali 185