Any help would be appreciated here.
I am trying to get the Field value of the Lookup type Entity (Customer Assets) through the ModelDrivenFormIntegration (Work Order) in a Canvas App.
Below is the formula that I am applying
LookUp( 'Customer Assets', 'Customer Asset'=[@ModelDrivenFormIntegration].Item.'Primary Incident Customer Asset'.'Customer Asset' ).Name
"[@ModelDrivenFormIntegration].Item" refers to the Work order table.
I am able to see the Customer Asset's name in Canvas app.
However, when i Saved and Published it, not able to get the same value in the D365 Field Service.
We have already tried solution such as adding timer and updateContext but nothing seems to be working.
Hello @Anonymous ,
As per the error it is expecting mandatory field called msdyn_name
So try passing that value also in PATCH
Set(customerAssetName ,LookUp(
'Customer Assets',
'Customer Asset'=[@ModelDrivenFormIntegration].Item.'Primary Incident Customer Asset'.'Customer Asset'
));
Set(nameOfAsset, Patch('Work Orders', { 'Work Order Number': ModelDrivenFormIntegration.Item.'Work Order Number'}, {msdyn_name:nameofworkorder,'Customer Asset': customerAssetName}))
Please mark as Answer if it is helpful and provide Kudos
Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
Hi @rampprakash ,
I tried your solution and added this formula on Screen's OnVisible Property
Set(customerAssetName ,LookUp(
'Customer Assets',
'Customer Asset'=[@ModelDrivenFormIntegration].Item.'Primary Incident Customer Asset'.'Customer Asset'
));
Set(nameOfAsset, Patch('Work Orders', { 'Work Order Number': ModelDrivenFormIntegration.Item.'Work Order Number'}, {'Customer Asset': customerAssetName}))
and added this in Text property of Text Component
nameOfAsset.'Customer Asset'.Name
and it didn't work. also, it started giving me this error in the D365 work order where I have embedded my canvas app.
Hello @Anonymous,
Did you PATCH the Update to the System
Set(customerAseetName,LookUp(
'Customer Assets',
'Customer Asset'=[@ModelDrivenFormIntegration].Item.'Primary Incident Customer Asset'.'Customer Asset'
).Name);
Patch(TableName,{TableUniqueID: GUID/USE LOOKUP},{customerAseetFieldName,customerAseetName})
For update you can use https://debajmecrm.com/using-patch-function-in-canvas-app-to-update-a-cds-record-based-on-value-of-non-primary-key-field/ for your reference
Please mark as Answer if it is helpful and provide Kudos
Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
Blog : https://microsoftcrmtechie.blogspot.com
mmbr1606
22
Super User 2025 Season 1
stampcoin
17
ankit_singhal
11
Super User 2025 Season 1