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

Help with trigger - If formula
Greetings!
I'm trying to use this code:
for(Event r: trigger.new){
if (r.WhatID CONTAINS '%006%'){
Opportunity opp = [select id,name,StageName from Opportunity where id =: r.whatID limit 1];
r.Stage__c = opp.StageName;
}
What i'm trying to get, is when the r begins with 006 i paste the stagename on the filed, if not then r must be some text like "Empyt"
This is for the Event object.
Thank you!!!!
I think you want your condition to look something like:
See if that works. Good luck.