• HendrataSFDC
  • NEWBIE
  • 0 Points
  • Member since 2017
  • Owner
  • Hendrata Realty


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Hello... I need help on how I can accomplish the solution.
  • Custom Object 1 = Deposit__c
  • Custom Object 2 = Fee__c
  • Both Deposit__c and Fee__c are not directly related and each object is related to another custom object called "Permit__c" (kinda like a parent object so called), so I have created a junction object called "Deposit_And_Fee__c"
I have records for both Deposit and Fee objects and now the goal is I need to "AUTO" create Junction Object Deposit_And_Fee__c records coming from existing Deposit__c records and Fee__c records and keep creating junction object records everytime either deposit or fee record is created.
Also, Only Deposit records that have Fee records will be created (as both fields are required fields), but I need the solution to be smart enough to only search for Deposit records first, and look for the associated fee records.
(See below for illustration)
Trigger is what I think the correct way of solving my problem. If anyone can give a help or hint on how to get the list records or come up with full solution... very much appreciated...

User-added image
Deposit and Fee list view
If an object has two Master Detail relatioship, how to check which one primary and which one secondary ?