You need to sign in to do that
Don't have an account?
JonSimmons
Problem saving Trigger to Server
I have developed a simple trigger that works fine on my dev org and a clients Enterprise org. I'm attempting to create this same Trigger on another client's org but Eclipse wont save it for me.
I have created the project so I have a stub trigger without issue but when I copy in my trigger code and try to save I just get a warning that says "File only saved locally, not on server", but no reason why and no actual error.
I found that if I set the Trigger to Inactive then Eclipse will upload the code but I cannot Activate the trigger.
Is there a permission that I dont know about that will allow me to create a trigger but not actvate it? Is there some trick to activating this trigger that I didnt need on the other orgs?
Thanks
Jon
From the Force.com Project you've created against your developer org, containing the trigger you want to deploy, right-click the "src" folder and in the context menu select Force.com > Deploy to Server...
This wizard will walk you through the process of deploying your code to another Salesforce organization, and should provide better feedback as to why the deployment is failing.
Since you did not mention deploying an Apex Class at the same time as your trigger, my guess is that your code does not meet the code coverage minimums to deploy to a production organization. You will need to create an Apex Class and declare one or more TestMethods which exercise your trigger, and then deploy the trigger and the test class(es) at the same time through the Deploy to Server wizard.
I understand that I have to create some Unit Tests that can be used to test this trigger, but I'm not sure that's even possible.
This trigger doesn't result in any changes that I can test for.
My code is below, the Trigger fires After Update of a Task. If the Creator is different then the Owner (meaning someone created a task and assigned it to another user) AND the Task has just been Completed, then an eMail will be generated to inform the creator that the task is complete.
I can create a task, then update it as Completed but I'm not sure how to test to verify that an eMail has been generated and sent.
I suppose I could write back to the task with the results of the eMail send, but testing one value probably isn't going to cover the 75% coverage requirement.
Can you provide any guidance?
Thanks
Jon