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

Pass value from canvas app gallery to dynamics 365 field

Hi, 

 

I have a canvas app gallery with different items embedded in an Dynamics 365 form.

Is it possible to pass a value from the item gallery to a text field in the form when I click in the item ? 

 

Thanks in advance !

 

1 ACCEPTED SOLUTION

Accepted Solutions
GarethPrisk
Super User II
Super User II

You can't pass anything back directly, but you are able to easily patch the record. Using Patch, you can make any change you need to the record. You will not see the change show up on the MDA form, however, until you invoke a Refresh.

https://docs.microsoft.com/en-us/powerapps/maker/model-driven-apps/embedded-canvas-app-actions#refre...

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch

 

View solution in original post

3 REPLIES 3
GarethPrisk
Super User II
Super User II

You can't pass anything back directly, but you are able to easily patch the record. Using Patch, you can make any change you need to the record. You will not see the change show up on the MDA form, however, until you invoke a Refresh.

https://docs.microsoft.com/en-us/powerapps/maker/model-driven-apps/embedded-canvas-app-actions#refre...

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch

 

View solution in original post

Hi Gareth, 

 

Thanks for your help. 

I added this line-> Patch('Quote Products',Defaults('Quote Products'),{'Manual Discount':2})  in the NextArrow control in the item for to update the "Manual Discount" field in the Quote Products entity.

HoracioCrespo_1-1607293010502.png

I added now a button for to refresh the data in the MDA form. but, when I add the next line-> ModelDrivenFormIntegration.RefreshForm(false) it launches an error because cannot find  the ModelDrivenFormIntegration object. 

 

HoracioCrespo_0-1607292707949.png

 

Do you have any idea why ? 

 

Thanks

 

Hi Gareth, 

I resolved the problem. Openning the canvas app from the field properties form I can see the object ModelDrivenFormIntegration and now clicking in the item I can save the data in a field in the form. 

 

field properties.PNG

Thank you !

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

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,855)