0

I wrote the below query and it keeps returning this error:

"FROM npsp__Address__c) ^ ERROR at Row:11:Column:6 Didn't understand relationship 'npsp__Address__c' 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 Address object details are:

API Name: npsp__Address__c

Custom True Singular Label: Address

Plural Label: Addresses

The object is part of the NPSP installed package.

What is it that I am doing wrong?

SELECT ID, name, Solicitor__c, Secondary_Solicitor__c, Account_Primary_Solicitors_rollup__c, (SELECT id, name, phone, npe01__PreferredPhone__c, email, npe01__Preferred_Email__c FROM Contacts), (SELECT id, npsp__Household_Account__c, npsp__Formula_MailingAddress__c, npsp__MailingCity__c, npsp__MailingCountry__c, npsp__MailingState__c, npsp__Geolocation__c, npsp__MailingStreet__c, npsp__MailingPostalCode__c FROM npsp__Address__c)

FROM Account

1 Answer 1

0

I'm guessing about the data model here, but I'm assuming the npsp__Address__c object is a child of the Account object.

When querying child records, you need to use the relationship api name.

At a guess, trying replacing FROM npsp__Address__c with FROM npsp__Address__r.

If this doesn't work, go to the lookup field in setup and find the relationship name.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .