Hi everyone,
I'm looking to integrate my canvas app into a model driven app. In the model driven app, is it possible to save a single record to multiple entities?
Hi @karimabdelrazek ,
Could you please share a bit more about your scenario?
Do you want to use your Model-Driven app or the embedded canvas app to save a single record back to multiple entities?
If you want to use Model-Driven app to save single one record back to multiple entities, I afraid that there is no direct way to achieve your needs. Currently, a Entity form in Model-Driven app could only be bind to single one Entity, which could not save value back to multiple Entities.
If you want to use the embedded canvas app in your Model-Driven App to save a single record back to multiple entities, I think it is possible. Within this embedded canvas app, you need to add your multiple Entities as data source in this canvas app firstly. And then you could use the Patch function to patch single one record back to multiple Entities.
The Patch formula example as below:
Patch(
Entity1,
Defaults(Entity1),
{
Column1: "xxxx",
Column2: "xxxx",
...
}
);
Patch(
Entity2,
Defaults(Entity2),
{
Column1: "xxxx",
Column2: "xxxx",
...
}
);
Patch(
Entity3,
Defaults(Entity3),
{
Column1: "xxxx",
Column2: "xxxx",
...
}
);
...
...
Within above Patch formula, you could also reference the column value from your Model-Driven app form through the ModelDrivenFormIntegration.Item property. For example, you could modify above formula as below:
Patch(
Entity1,
Defaults(Entity1),
{
Column1: ModelDrivenFormIntegration.Item.Refernece_Col1,
Column2: ModelDrivenFormIntegration.Item.Refernece_Col2,
...
}
);
Patch(
Entity2,
Defaults(Entity2),
{
Column1: ModelDrivenFormIntegration.Item.Refernece_Col1,
Column2: ModelDrivenFormIntegration.Item.Refernece_Col2,
...
}
);
Patch(
Entity3,
Defaults(Entity3),
{
Column1: ModelDrivenFormIntegration.Item.Refernece_Col1,
Column2: ModelDrivenFormIntegration.Item.Refernece_Col2,
...
}
);
...
...
More details about embedding canvas app in PowerApps, please check the following blog:
Please try above solution, hopes it could help in your scenario.
Regards,
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2