You need to sign in to do that
Don't have an account?

Hi ,I have 2 objects "Positions" and "Employment Websites" having many to many relationship between them with "Job Posting" as a junction object.
Hi ,I have 2 objects "Positions" and "Employment Websites" having many to many relationship between them with "Job Posting" as a junction object.
->I have a case "C1" on "Position"
->Position "P1" is posted to 3 Employement Websites "W1" ,"W2" and "W3"
->My requirement is to show case "C1" on Employement Website "W1" ,"W2" and "W3"
How can we acheive the above requirement?
->I have a case "C1" on "Position"
->Position "P1" is posted to 3 Employement Websites "W1" ,"W2" and "W3"
->My requirement is to show case "C1" on Employement Website "W1" ,"W2" and "W3"
How can we acheive the above requirement?
You can refer https://developer.salesforce.com/docs/atlas.en-us.fundamentals.meta/fundamentals/adg_relationships_cust_many_relationship.htm
Thanks for your reply . My requirement is to copy related list of one object to another .
The above link is just for adding the fileds .
I have look up relationship between position and case where case is a child object.
Objects :
Position
Employment Websites
Job Posting (Junction object for Position and Employement Websites)
CaseRelatedList( junction object between case and employement websites)
case (look up to Position)
I am trying to copy case related list from Position to Employment Websites .
Trigger :
trigger CloneCaseRelatedList on Case (after insert) {
set<string> posId = new set<string>();
Map<string,Job_Posting__c> posEmpWebsite = new Map<String,Job_Posting__c>();
if(Trigger.isInsert)
{
for(Case c : Trigger.new)
{
posId.add(c.Position__c);
system.debug(posId);
}
}
for(Job_Posting__c j : [Select Position__c ,Employment_Website__c from Job_Posting__c where Position__c in : posId ])
{
posEmpWebsite.put(j.Position__c, j);
system.debug(posEmpWebsite);
}
//I am stuck at this point How I can loop through all employmemt websites that position have
}