Salesforce Origin - SOQL Sub-query NullPointerExeption

asked 2018-10-25 10:52:28 -0600

peter_f gravatar image

updated 2018-11-08 23:20:18 -0600

Hi,

In basic, sub queries are working thx @Pat! But it seems values in the select list of the sub query are handled differently than in the where clause.

The following statement results in a null pointer exception during preview or execution:

SELECT Id , Name , (SELECT Id , UserOrGroupId , AccountId , RowCause , UserOrGroup.Type FROM Shares WHERE ( UserOrGroup.Type = 'Queue' ) ) FROM Account WHERE ( Id = '0019E00000qMdixQAC' ) ORDER BY Id asc

When I remove the UserOrGroup.Type part from the select list, but keep it in where clause it just works fine. So I think UserOrGroup.Type in the select list is causing the issue. Changing the sub query's where expression to something useless like UserOrGroup.Type = 'Queuesss' (of course still not in the select list) I get an empty shares node, as expected. So filtering in the where clause using the UserOrGroup.Type seems to work.

SELECT Id , Name , (SELECT Id , UserOrGroupId , AccountId , RowCause FROM Shares WHERE ( UserOrGroup.Type = 'Queue' ) ) FROM Account WHERE ( Id = '0019E00000qMdixQAC' ) ORDER BY Id asc

Tested with SDC 3.5.1

Opened an issue on the Jira board: SDC-10422

Best Peter

edit retag flag offensive close merge delete

Comments

SDC-9762 has not fixed the problem. Did an upgrade to SDC 3.5.1 and the error still exists.

peter_f gravatar imagepeter_f ( 2018-10-26 04:41:24 -0600 )edit