SoapFault When Executing UserRecordAccess Query

Issue #1701 resolved
Bob Hatcher created an issue

When running a query in the SOQL Query panel:

select hasreadaccess, RecordId from UserRecordAccess where userid = '0052M000006XXXXXXX' and recordid = '5002M000017XXXXXXX'

I get error:

org.apache.cxf.binding.soap.SoapFault: INVALID_FIELD: RecordId field must be selected

RecordId is clearly selected.

This query runs fine in the dev console:

I’m able to run other queries in this panel without issue, such as:

select id from account limit 1

… returns the one Account ID as expected.

I am on 2.1.3.7.

Thanks!

Comments (8)

  1. Scott Wells repo owner

    I'm also seeing the provided query failing via Developer Console:

    Issue_1701.png

    and the CLI:

    sfdx force:data:soql:query -u demo "select hasreadaccess, RecordId from UserRecordAccess where userid = '0052M000006XXXXXXX' and recordid = '5002M000017XXXXXXX'"
    ERROR running force:data:soql:query:  Unexpected argument: select hasreadaccess, RecordId from UserRecordAccess where userid = '0052M000006XXXXXXX' and recordid = '5002M000017XXXXXXX'
    
  2. Bob Hatcher reporter

    Did you notice I redacted the ID values? I doubt the values I gave are valid. Please substitute a real user ID and record ID in your org.

    Thanks, Bov

  3. Scott Wells repo owner

    Aha! Yes, I see the issue now. This has to do with the way that IC now runs a COUNT query by default first. That won't work with this particular system object, though. I'll add it to an exclusion list for that validation step. Thanks for bringing this to my attention.

  4. Log in to comment