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

Unable to update Model-driven Record from Embedded Canvas App

I have an embedded Canvas App to get Pin Location coordinated from my current location for the selected record in the  Model-driven app. I have written a Patch formula to Update the record in the Model-driven app but the record is not getting updated. I have embedded the Canvas app in the Main Form of Contacts table.

 

OnSelect of Save Button  below is the formula, I am saving the pin location name and coordinates in the Contacts table of CDS

Patch (Contacts, ModelDrivenFormIntegration.Item,
{
'Address 2: Name': DataCardValue5.Text,

'Address 2: Longitude': Map1.ClickedLocation.Longitude,

'Address 2: Latitude': Map1.ClickedLocation.Latitude
});

ModelDrivenFormIntegration.SaveForm()

 

The Model-driven record is not updating with the data from Canvas App.

 

I followed https://www.d365geek.co.uk/single-post/2020/04/16/Update-Model-driven-Record-from-Embedded-Canvas-Ap... 

1 ACCEPTED SOLUTION

Accepted Solutions
EricRegnier
Super User II
Super User II

Hi @pthakur,

You don't need to use the ModelDrivenFormIntegration.SaveForm(). You can simply save the Edit form (container of the data ards) with the SubmitForm function. E.g SubmitForm(EditFormName)

You can also RefreshForm is the data is not reflect on the model-driven form afterwards

Hope this helps!

View solution in original post

1 REPLY 1
EricRegnier
Super User II
Super User II

Hi @pthakur,

You don't need to use the ModelDrivenFormIntegration.SaveForm(). You can simply save the Edit form (container of the data ards) with the SubmitForm function. E.g SubmitForm(EditFormName)

You can also RefreshForm is the data is not reflect on the model-driven form afterwards

Hope this helps!

View solution in original post

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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

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

Users online (54,976)