cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dee2005
Advocate III
Advocate III

I can Patch Potential Customer (_customerid_value) to a quote record but I cannot access it in my App

When I create quotes in PowerApps I can succesfully assign the Customer as an existing Account, but when I access the quote in my Apps I cant retrieve the Customer using ThisItem.'Potential Customer (_customerid_value)'

 

In my patch function I set 'Potential Customer (_customerid_value)': to a variable which contains the customer record. This works perfectly as I can see the customer when I export to PDF, But when I try to display the quote information in a gallery or a Screen I cant access it. In Dynamics interface and my word template it uses the field customeridname but that is not available in PowerApps. 

1 ACCEPTED SOLUTION

Accepted Solutions
Fubar
Solution Sage
Solution Sage

As Customer can be either account or contact, in the Gallery you have to check isBank and isType and then display the appropriate value of the account/contact

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/working-with-references#show-the-fields...

If( IsBlank( ThisItem.'Company Name' ), "",
    IsType( ThisItem.'Company Name', Accounts ),
        "Account: " & AsType( ThisItem.'Company Name', Accounts ).'Account Name',
    "Contact: " & AsType( ThisItem.'Company Name', Contacts ).'Full Name'
)

 

View solution in original post

2 REPLIES 2
Fubar
Solution Sage
Solution Sage

As Customer can be either account or contact, in the Gallery you have to check isBank and isType and then display the appropriate value of the account/contact

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/working-with-references#show-the-fields...

If( IsBlank( ThisItem.'Company Name' ), "",
    IsType( ThisItem.'Company Name', Accounts ),
        "Account: " & AsType( ThisItem.'Company Name', Accounts ).'Account Name',
    "Contact: " & AsType( ThisItem.'Company Name', Contacts ).'Full Name'
)

 

Thank you @Fubar ,

 

This works

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Users online (1,571)