Announcements
When using context.mode.contextInfo, property entityId gives the id of the parent form record, which is what is expected. But property entityTypeName gives the name of the subgrid entity and not the parent form entity.
Two questions:
Thanks
How are you accessing context.mode.contextInfo?
contextInfo is not a published accessible attribute of context.mode within the PCF framework.
Hi TanguyT,
Currently, this API is not documented and not supported. We understand the need for controls to get this type of context information and will be exposing it through supported APIs soon.
Todd
So that explains why my idea request for access to context.mode.contextInfo disappeared so quickly...
I'm glad to hear it's arriving soon as that saves me writing the workaround I thought I would have to create to do things in a "supported" way...
Hi @TanguyT, I have a similar scenario where I need the parent ID and entity name in a subgrid control. Have you found a workaround? Look at the querystring parameters? Cheers
Hi @EricRegnier ,
You can use context.mode.contextInfo.entityTypeName and context.mode.contextInfo.entityId.
They are both unsupported for now, but they are working just fine.
Kind regards,
Diana
Thanks for confirming @DianaBirkelbach, but I can't access context.mode.contextInfo in the typings... I guess we need add the
You are correct
@ts-ignore is a possibility. The alternative is casting:
(context.mode as any).contextInfo.entityId
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 2026 Super Users!
Congratulations to our 2025 community superstars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Vish WR 977
Valantis 664
11manish 530