• Terell Pigram
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
I have an object call "Applicant" with a field called "high_school__c"*(Master).  high_school_data__c has a master detail relationships with another object called "high_school_data__c"(detail).  In APEX, how would can I create a new instance of "Applicant" and also create it's "high_school_data__c" details.

Example:
Applicant a = new Applicant();
a.high_school__r.Name__c = "East High School".

I've tried doing something like this but it doesn't seem to work.  Could someone please assist me?