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).
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?
Solved! Go to Solution.
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")
)
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!
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!
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
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")
)
Thank you! Do you happen to know if there is a limit to number of parameters I can specify?
Brilliant. Thank you Asdesion, this is exactly what I have been looking for!
User | Count |
---|---|
236 | |
113 | |
94 | |
59 | |
31 |
User | Count |
---|---|
286 | |
132 | |
106 | |
63 | |
57 |