web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Not able to access the...
Power Apps
Unanswered

Not able to access the relational table using the ModelDrivenFormIntegration for the Lookup type

(0) ShareShare
ReportReport
Posted on by

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.

I have the same question (0)
  • Ram Prakash Duraisamy Profile Picture
    5,593 Super User 2025 Season 2 on at

    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

     

     

  • Community Power Platform Member Profile Picture
    on at

    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.

    Screenshot 2022-01-11 at 6.25.22 PM.png

  • Ram Prakash Duraisamy Profile Picture
    5,593 Super User 2025 Season 2 on at

    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

    Blog : https://microsoftcrmtechie.blogspot.com

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard