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

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'
)

 

View solution in original post

Thank you @Fubar ,

 

This works

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,052)