NonReferenceFieldException throw when external object referencing a parent field via indirect lookup on a custom object. #498
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe the bug
I have a situation where I am querying an external object that has an indirect lookup field to a field on a custom object in Salesforce. The NonReferenceFieldException is thrown when trying to do so. I believe if the soap type of the field is a string and the display type is reference that this should capture this situation and it should be safe to use the selector pattern. Please advise if this solution makes sense.
To Reproduce
It will take some time to set up and environment with an external object that has a indirect lookup to a custom (non external) object.
Expected behavior
Expect the selector pattern to return fields via indirect lookup.
Version
This error is current happening as of 2024-10-29.
This change is