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

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

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

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