You need to sign in to do that
Don't have an account?
Sascha Deinert
Trigger Relationship Field
Hello,
I have a very simple trigger which is working fine in the sandbox but it doesn't work in the production. If someone change the owner of the opportunity or add a new opportunity the customfield team__c should be filled with the owner team value. But if I change the owner the field keep blank. If I change the team field at the opportunity manuelly and then I change the owner then becomes the field also blank.
Thanks,
Sascha
I have a very simple trigger which is working fine in the sandbox but it doesn't work in the production. If someone change the owner of the opportunity or add a new opportunity the customfield team__c should be filled with the owner team value. But if I change the owner the field keep blank. If I change the team field at the opportunity manuelly and then I change the owner then becomes the field also blank.
trigger setTeamOpportunity on Opportunity (before update) { for(Opportunity o : trigger.new) { Opportunity oldOpportunity = trigger.OldMap.get(o.ID); if(o.ownerid != oldOpportunity.ownerid) { o.Team__c = o.Owner.Team__c; } } }Can someone help me please.
Thanks,
Sascha