Skip to main content

Notifications

Community site session details

Community site session details

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

Bug in context.mode.contextInfo property for subgrid : entityTypeName gives incorrect value

(0) ShareShare
ReportReport
Posted on by 113 Most Valuable Professional

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:

  • when contextInfo will come as a predefined and supported property of property "mode"?
  • when a fix can be expected for this bug?

Thanks

  • Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at
    Re: Bug in context.mode.contextInfo property for subgrid : entityTypeName gives incorrect value

    Hi  @EricRegnier , 

     

    @ts-ignore is a possibility. The alternative is casting:

    (context.mode as any).contextInfo.entityId

     

     Kind regards,

    Diana

  • Tanguy TOUZARD Profile Picture
    113 Most Valuable Professional on at
    Re: Bug in context.mode.contextInfo property for subgrid : entityTypeName gives incorrect value

    You are correct 

  • EricRegnier Profile Picture
    8,714 Most Valuable Professional on at
    Re: Bug in context.mode.contextInfo property for subgrid : entityTypeName gives incorrect value

    Thanks for confirming @DianaBirkelbach, but I can't access context.mode.contextInfo in the typings... I guess we need add the 

    @ts-ignore tag?
  • Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at
    Re: Bug in context.mode.contextInfo property for subgrid : entityTypeName gives incorrect value

    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

  • EricRegnier Profile Picture
    8,714 Most Valuable Professional on at
    Re: Bug in context.mode.contextInfo property for subgrid : entityTypeName gives incorrect value

    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

  • Ben Thompson Profile Picture
    1,400 on at
    Re: Bug in context.mode.contextInfo property for subgrid : entityTypeName gives incorrect value

    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...

  • Tanguy TOUZARD Profile Picture
    113 Most Valuable Professional on at
    Re: Bug in context.mode.contextInfo property for subgrid : entityTypeName gives incorrect value
    Great! Please don’t forget to fix the bug where EntityTypeName shows the wrong value
  • Verified answer
    ToddTrotter Profile Picture
    on at
    Re: Bug in context.mode.contextInfo property for subgrid : entityTypeName gives incorrect value

    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

  • Tanguy TOUZARD Profile Picture
    113 Most Valuable Professional on at
    Re: Bug in context.mode.contextInfo property for subgrid : entityTypeName gives incorrect value
    I know but this is the only way included (even if not documented, this is why I asked) that should let you know the context of the entity record the PCF component is rendered
  • Ben Thompson Profile Picture
    1,400 on at
    Re: Bug in context.mode.contextInfo property for subgrid : entityTypeName gives incorrect value

    How are you accessing context.mode.contextInfo?

     

    contextInfo is not a published accessible attribute of context.mode within the PCF framework.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

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 87 Most Valuable Professional

#2
mmbr1606 Profile Picture

mmbr1606 71 Super User 2025 Season 1

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 65 Super User 2025 Season 1

Overall leaderboard