cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
OkayGoogle
Helper II
Helper II

Dynamics 365 Input Context

In Dynamics 365 Finance and Operations, we can embed PowerApps into workspaces. When configuring the app for embedding, you put the App Name, the App ID, and an Input Context for the app, which lets you choose from various entities from the Dynamics environment (see image).PowerAppsContext.png

 

How do I obtain this input context within the Power App itself? If I'm supposed to use the function UpdateContext, what is the name of the variable I need to reference?

1 ACCEPTED SOLUTION

Accepted Solutions
asdesion
Microsoft
Microsoft

I realize this thread is older, but if you are still looking for the answer you need to use the Param("EntityId"function. I usually set a variable = Param("EntityId") on the OnStart property of the app.

 

For example, if my embedded app lives on the Sales order form, I set my Input context for the app to "Sales order - SalesTable_SalesId". Then on my OnStart property, I set a variable SO equal to this passed value by

Set(

   SO,

   Param("EntityId")

)

View solution in original post

7 REPLIES 7
chsanche
Microsoft
Microsoft

Hi @OkayGoogle 

 

The documentation indicates that UpdateContext in PowerApps is for updating context variables within your application, you can find the documentation and some examples in the following URL: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-updatecontext

 

Best Regards

--

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions help users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

If this post helps you give a :thumbs_up: and if it solved your issue consider Accept it as the solution

Thanks for the link @chsanche ! I have already looked at this documentation, but it does not specify how to obtain the context from Dynamics 365 Finance and Operations. All I see in the documentation is that I can create variables through UpdateContext, and then update said created variables. How do I get a reference to a context that already exists?

Hi @OkayGoogle 

 

The UpdateContext works only for PowerApps variables. the Input context from Dynamics is not a field that you can query in your application unfortunately, you can only get the fields in the entities.

 

Best Regards

--

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions help users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

If this post helps you give a :thumbs_up: and if it solved your issue consider Accept it as the solution

Does that mean that the option "Input context for the app" is actually useless? Why would it be in there, if I may ask? @chsanche 

asdesion
Microsoft
Microsoft

I realize this thread is older, but if you are still looking for the answer you need to use the Param("EntityId"function. I usually set a variable = Param("EntityId") on the OnStart property of the app.

 

For example, if my embedded app lives on the Sales order form, I set my Input context for the app to "Sales order - SalesTable_SalesId". Then on my OnStart property, I set a variable SO equal to this passed value by

Set(

   SO,

   Param("EntityId")

)

View solution in original post

Thank you! Do you happen to know if there is a limit to number of parameters I can specify?

Anonymous
Not applicable

Brilliant. Thank you Asdesion, this is exactly what I have been looking for!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (19,694)