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
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Users online (2,352)