I am expecting Opportunity in table (vf page) from contact and this contact is under the account.

can anybody help me out for this...

Thank you.

  • Can you be elaborate your question? And possible post any code which you have so far. – Goki Aug 4 '15 at 6:01
  • Thank you for reply but i got the solution. @Goki – Nihar Aug 4 '15 at 6:10
  • @Nihar In that case please post your solution as answer and mark it as answer, so that it will help others. – Saroj Bera Aug 4 '15 at 6:33

Here i the solution of my question,

I am expecting the opportunity record and it Should only show opportunities at the account for the logged in contact.

oppData = new List<Opportunity>();
oppData = [SELECT ID, Name, Tax_rate__c,Billing_Street__c,Owner.Name,AccountID,Account.Name,Order__c,StageName,CloseDate FROM Opportunity
           WHERE AccountId IN (SELECT AccountId from Contact WHERE Name =: contactName)];

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.