Creating a self-lookup with same parent & children relationship names
|Knowledge Article Number||000205980|
|Description||When you create a self-lookup on an object and reference a child relationship with the same name, this creates a problem when you generate a WSDL.
On Account, create a self-lookup field with the below details and generate the WSDL.
Field Name: Account_Lookup
Child Relationship Name: Account_Lookup
The parent relationship will be missing from the WSDL.
|Resolution||To resolve this issue, at minimum, change the name of the child relationship to be a plural of the parent name.
The best practice would be to give the field a more meaningful name. For example, if you are creating a lookup field on the Account object to another Account, that field could be called "Parent Account" and the child relationship could be "Child Accounts" or "Affiliated Accounts."