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

Need Help with test case....
Hello All -
I am new to SF and I just wrote my first apex trigger. I believe that in order to deploy the trigger into production I need to write test cases? How and where do I do this? I have looked at samples but they seem complex?
Any help would be great!
Below is my trigger....
Thanks!!!
trigger OrderOwnerUpdate on Opportunity (before insert, before update) {
//change the owner from customer service to RSM
ID TerritoryId;
Opportunity[] opp = Trigger.new;
for (opportunity s:opp)
{
if (s.name != null)
{
ID OpportunityOwnerId = [Select User_id__c from territories__c
where name = :s.opp_ship_to__c].user_id__c;
s.ownerid = OpportunityOwnerId;
}
}
}
Here is quick mock up..
Make sure to write the todo for the territories__c object with the right user Id.
Dan GrandquistEtherios - Technical Architect
All Answers
Here is quick mock up..
Make sure to write the todo for the territories__c object with the right user Id.
Dan GrandquistEtherios - Technical Architect
THANK YOU!!!!!!