You need to sign in to do that
Don't have an account?
anitha20
Trigger for Opportunity value in custom object
Can any one tel me how to write an trigger to insert the Opportunity lookup value in the custom object ,in which object is related list for Opportunity.Thanks in advance reply me!!!!!!!
i want to do this for particular recordtype in custom object.I want the Opportunity lookup to update only for that recordr type.
This is a basic framework to get you started... not sure how you are getting the opportunity ID, but hopefully this helps.
trigger UpdateCustomObject (before insert, before update){
for(CustomObject__c c: trigger.new){
if (c.RecordType == TheRecTypeICareAbout){
c.OpportunityLookup__c = theOpportunity.id;
}
}
}