You need to sign in to do that
Don't have an account?
MikeD13
Saving Triggers/Classes to Salesforce via Eclipse
Ok, I've read a dozen threads and all the documentation I can find but still can't seem to get the gist of how to save objects to Salesforce. I etiher end up receiving insufficient coverage messages or the items just don't seem to save anyway. Somehow, I managed to save a trigger and its test class to Salesforce yesterday. Today, I tried adding another class and trigger but the coverage errors were blocking me. The new class kept validating against the old trigger and not the new one. I then deleted all my objects to get a fresh start (I saved the code in local text files first). Now, when I try to save items, they don't get saved in Salesforce but there is no "only saved locally" message.
Can someone please give me a step-by-step list of how I go about creating Apex Triggers/Classes and saving them to SF through Eclipse? In my scenario, I am trying to create two triggers (on different objects). One of the triggers will be calling a method from another class.
I'm using Eclipse 3.3.1.1 and the Apex Toolkit 8.1.0.200710161138 (not using Force.com due to rollbackOnError issue). Also, I am using the Enterprise Edition of Salesforce.
UPDATE: I have finally gotten both triggers onto Salesforce. I had to use a single class for all my methods. Within this class, I created a single testMethod that runs tests against all objects. My new issue is getting updates saved. When I modify my code and save it, it does not seem to get pushed out to Salesforce. Any thoughts?
Message Edited by MikeD13 on 01-16-2008 02:08 PM
Can someone please give me a step-by-step list of how I go about creating Apex Triggers/Classes and saving them to SF through Eclipse? In my scenario, I am trying to create two triggers (on different objects). One of the triggers will be calling a method from another class.
I'm using Eclipse 3.3.1.1 and the Apex Toolkit 8.1.0.200710161138 (not using Force.com due to rollbackOnError issue). Also, I am using the Enterprise Edition of Salesforce.
UPDATE: I have finally gotten both triggers onto Salesforce. I had to use a single class for all my methods. Within this class, I created a single testMethod that runs tests against all objects. My new issue is getting updates saved. When I modify my code and save it, it does not seem to get pushed out to Salesforce. Any thoughts?
Message Edited by MikeD13 on 01-16-2008 02:08 PM
Hi Mike,
Well i am not very clear what is your problem but creating classes and triggers is very easy.
Just go through this:
For new Class in Eclipse:
1. Right click on apex classes subfolder of your project on project explorer -> apex -> new class.
For new Trigger in Eclipse:
1. Right click on apex Triggers subfolder of your project on project explorer -> apex -> new Trigger.
The other question I have is in regards to setting up tests. I had created one class and one trigger and finally managed to get them over to SF. I then wanted to create a second trigger and class and save them up to SF. The new class was only testing itself and the old trigger even though the testmethod in the new class was only specific to the new trigger. The new trigger was being completely ignored (untested) and therefore would not make it up to SF at all. I managed to work around this by combining all of the methods and tests into one class and testmethod. Is this the correct way to do it? Can we only load one class from Eclipse?
Just so you know, I do seem to have it all working fairly smoothly now. The trick is to code against my sandbox first and then use the deploy option to my production environment (so far.. so good). I just can't seem to save directly from Eclipse to SF EE in production.
Sorry for going on for so long.
Thanks,
Mike
Hi everybody,
It's been a while sins this post, but I am having mayor difficluties with eclipse.
All is working well. I have my sandbox, devolper and real environment installed. A class in the sandbox works fine, when I test it in eclipse it gives me an error. Same as above, can't get it to work. If I test the class in the sandbox, no errors, what am I doing wrong. Also how do I get this class from my sandbox to my real environment?
Problem is, that my my help file is not working, it keeps giving me a "can't find the webpage error" as if I am offline, but I am not! Changed settings, reinstalled everything, it doesn't work
Please any link to a good help file or some tips it driving me ....... :smileysad:
Hope to hear from you
thanks
Jeroen
Has this issue been solved?
I had 80% test coverage and today in Eclipse I cannot get all my test methods to run. But if I run the tests in the sandbox I get the 80% coverage. Is this a bug with Eclipse?