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