superfell / SoqlX

SoqlXplorer is an awesome tool for developers using the Salesforce.com platform.
https://pocketsoap.com/osx/soqlx/
Other
273 stars 54 forks source link

If lookup relationship field contains mix of null and non-null values, getting odd null field return instead of lookup field name #83

Closed DallasDeuce closed 4 years ago

DallasDeuce commented 5 years ago

Describe the bug When query contains a lookup relationship thru multiple levels and contains a mix of null and non-null values, getting an odd return value on the records that have non-null in relationship lookup field (screenshot below).

To Reproduce Steps to reproduce the behavior:

  1. Write a query that includes a lookup relationship with multiple lookup references (example: pseExpense_Reportr.Budgetr.Item_Masterr.Name) and the lookup should have mix of null and non-null values for the query set that is returned.
  2. The records with null value somewhere in this relationship tree will be blank in query results (as expected) but the records without a null value should show the grandparent field name, but instead getting odd response like one below in query results in the column... in this example would expect to get 'Item 123' but instead get this stuff below.

pseBudgetc (null) fields={ "Item_Masterr" = "SCMCItem__c (null) fields={\n Name = \"Item 123\";\n} toNull={(\n)}"; } toNull=( )

  1. If you explicitly filter on this relationship column to filter for <> null, then you get lookup relationship field name as expected, but that's problematic to have to filter for that when you expect a mix of null and non-null lookup ref name values. I don't recall this occurring in the past and just noticed in past month or so (Aug 2019) so not sure if this is long-standing issue or not.

Screenshots image

Desktop (please complete the following information):

superfell commented 5 years ago

Thanks for the detailed report, will look into it.