function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
VarunCVarunC 

Package Install fails citing a Relationship not identified in SOQL

How do we surpass an issue when a package install fails by highlighting an error in an SOQL, citing an unknown Relationship used?

I've used following query:
Select Id, (Select Id From advpm__R00NR0000000VZZ8MAO__r) From Contact a where Id in : trigger.new


And it has failed to one of a client citing following error:
 
1. Didn't understand relationship 'advpm__R00NR0000000VZZ8MAO__r' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.
ContactTrigger: Didn't understand relationship 'advpm__R00NR0000000VZZ8MAO__r' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.

The Relationship, and Field and Object are all part of the managed released package. It installs fine to any other customer but just this one.

May be if someone else here has seen this kind of error on package install and has a workaround, then please share with me here, highly appreciated.
BalajiRanganathanBalajiRanganathan
I belive you should not have the namespace in the SOQL. salesforce will add it when it executes the installation.
 
Select Id, (Select Id From R00NR0000000VZZ8MAO__r) From Contact a where Id in : trigger.new

 
VarunCVarunC
No I don't think that could be the issue. I mean the app is installable in other orgs, without any error, but this time with this user it popped up this error on install. Plus, the docs say, if namespace is not added they auto add it, but if we add it ourselve, it don't conflict at all with the code. Providing namespace to our fields and objects and relationships actually keeps the code clean, plus there own Force.com IDE would not auto complete variables if our variables are not utilizing namespace of the