You need to sign in to do that
Don't have an account?
Josef Lagorio
Cross Object Trigger to update a field on Event
Would there be anyway to update the field on Activity with the field on Campaign? Specific events look up to campaigns and I would like to pull in the industry field from Campaigns to the associated Event.
Field on Campaign:
Industry (Industry__c)
Field on Activity:
Campaign Industry (Campaign_Industry__c)
Field on Campaign:
Industry (Industry__c)
Field on Activity:
Campaign Industry (Campaign_Industry__c)
if(evt.whatID!=null && evt.WhatId.getSObjectType().getDescribe().getName() == 'Campaign'){
Campaign c = [Select Industry__c from Campaign where Id=:evt.WhatId];
evt.Campaign_Industry__c=c.Industry__c;
update evt;
}
</pre>