Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
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.

Categories:
  • Ram Prakash Profile Picture
    5,179 Super User 2025 Season 1 on at
    Re: Not able to access the relational table using the ModelDrivenFormIntegration for the Lookup type

    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

  • Community Power Platform Member Profile Picture
    on at
    Re: Not able to access the relational table using the ModelDrivenFormIntegration for the Lookup type

    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 Profile Picture
    5,179 Super User 2025 Season 1 on at
    Re: Not able to access the relational table using the ModelDrivenFormIntegration for the Lookup type

    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

     

     

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Microsoft Dataverse

#1
mmbr1606 Profile Picture

mmbr1606 22 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 17

#3
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

Overall leaderboard

Featured topics