You need to sign in to do that
Don't have an account?
Trying to deploy the following trigger to production
trigger Call_Room on Case(before insert, before update) {
Map<Id, Case[]> contactCaseMap = new Map<Id, Case[]>();
For (Case ncase:Trigger.new) {
Id cid = ncase.contactId;
If (cid != NULL) {
if(contactCaseMap.get(cid) == null) contactCaseMap.put(cid, new Case[]{});
contactCaseMap.get(cid).add(ncase);
}
}
For(Contact c:[select Call_Room_Number__c from Contact where Id IN :contactCaseMap.keySet()]) {
for(Case ncase:contactCaseMap.get(c.id)) {
ncase.Call_Room_Number__c = c.Call_Room_Number__c;
}
}
}
This is the only thing I need to get into the production environment for an enterprise version system. I am useing Eclipse. I am having trouble following the process in the Developer's Guide...can anyone help?
I have since figured out a solution that worked for me. This is what I gleamed from the developer's guide and from reading numerous posts. I would appreciate any comments about how I might do this better in the future. Thanks
Here are the steps I took:
1. I installed Eclipse and the Force.com IDE
2. I wrote the following test code (yes, I figured out that the test needed to entered as a class...and the appropriate statements to use - or at least that which seemed to work) Keep in mind, I am a complete and utter newby
Now, what I don't know is whether I really did any of this correctly. I would appreciate any corrections or suggestions.
The end result was that the code seemed to work. I was able to test this in the sandbox and deploy it to production. I tested it in both the sandbox and the production environment and it all seems to work.