You need to sign in to do that
Don't have an account?
Kevin Jackson 11
SOQL Query Help - using one query to identify the next layer
I will preface this that I am fairly new at creating a controller so there several poor practices going on here.
The first Class (Contact) works fine. and I am trying to use it to help me get the related membership to the identified contact. I have tried several ways to get it done, but keep running into errors. I feel I am close, but that is only good with hand grenades and horse shoes.
Here is part of my Controller:
The first Class (Contact) works fine. and I am trying to use it to help me get the related membership to the identified contact. I have tried several ways to get it done, but keep running into errors. I feel I am close, but that is only good with hand grenades and horse shoes.
Here is part of my Controller:
public Contact getContact () { return[SELECT Id, name, email, MailingAddress, Phone, MailingCity, MailingState, MailingCountry, MailingPostalCode, MailingStreet FROM Contact WHERE Id IN (SELECT ContactId From User WHERE Id=:UserInfo.getUserId()) LIMIT 1]; } public Membership__c getMembership () { return[SELECT Id FROM Membership__c WHERE Contact_Associated__c = {!Contact.Id} LIMIT 1]; }
All Answers
Thank you VERY much!