cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

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

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?

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

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Solution Authors
Top Kudoed Authors
Users online (91,717)