2 Replies Latest reply on Feb 22, 2016 12:19 PM by Maheswar Gunampally

    Hierarchic relation between CustomObjects -  PK , Foreign Key

    Maheswar Gunampally


      I am curious to know if I can create a Primary Key - foreign Key relation to the properties of Custom Objects ?

      Eg : Say I have Custom Objs

      • Course - CourseId,Title,
      • Student - StudID, Name, DOB,
      • Enrollment -  EnrollD , CourseID, StudId , deadlineDt, Grade , PaymentDt ,
      • Payment - PayId, StudId, EnrollD


      I am not sure yet, this structure may be an overkill ... none the less If I don't want to post data to Payment without an entry in Enrollment for the student - (StudID,EnrollId - dedupeBy) . From what I understand so far ... as long as there is no unique record combo in a custom object data is accepted and 'created'. 

      Can we add a constraint to this entry.. since this has to be a valid in the other custom object as well ?


      Appreciate your help.

      - Mahesh