• chim chim 9
  • NEWBIE
  • 10 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 0
    Replies
When a new Non-Primary Contact is created and the Account related to the new Contact does not have any existing Contacts, the new Contact should automatically become the Account's Primary Contact.

Hi experts. Help me on this one. thank you
This is my query:
Account[] oldAcc = [Select Id, BillingStreet, (Select Id, AccountId, MailingStreet from Contacts)Name from Account Limit 10]

I tried using oldAcc.Contact but i got no values when i tried it using system debug.
This is my query:
Account[] oldAcc = [Select Id, BillingStreet, (Select Id, AccountId, MailingStreet from Contacts)Name from Account Limit 10]

I tried using oldAcc.Contact but i got no values when i tried it using system debug.