You need to sign in to do that
Don't have an account?
Lookup field failed to be queried because Salesforce is referencing wrong object with the same (Even with namespace)
The setup:
1. Org contains a custom object called objectX__c
2. A packaged app also contains a custom object called objectX__c but Salesforce automatically added a namespace there i.e. `someapp__.objectX__c`
3. The org has a custom lookup field on the account that looks to objectX__c, i.e. `Account.lookup_objectX__c`
4. The package app tries to run a query as `select id, lookup_objectX__r.some_field__c from Account`
5. This error occurs
No such column 'some_field__c' on entity 'someapp__objectX__c'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.
This error should not be happening because the lookup field is setup correctly to look at the non-namespaced object, but Salesforce is looking at the namespaced object which then fail.
once go to the link and log in with your Salesforce credentials. Use SOQL Query to get an exact SQOL statement.
Thank you,
Sandeep Chittineni.
Please check :
1. User have permision to field : some_field__c
2. if you are using correct relationship name for object someapp__objectX__c
Thanks