You need to sign in to do that
Don't have an account?
stra80
trigger & data loader problem
Hoyy,
I am trying to input one trigger into the enterprise edition account of our organization and is not showing up (except of the first lines) although the trigger working fine into my developer edition.
I am working with the eclipse and when i try to save the trigger to the standard object is notify me that the file saved only locally and not in the server!!!
how i can save it into the enterprise account??
i also tried to implement the data loader but the steps in order to implement it are unacceptable and i can't make it work!!
If anyone has a solution to these problems please let me know.
thanks,
stratos
I am trying to input one trigger into the enterprise edition account of our organization and is not showing up (except of the first lines) although the trigger working fine into my developer edition.
I am working with the eclipse and when i try to save the trigger to the standard object is notify me that the file saved only locally and not in the server!!!
how i can save it into the enterprise account??
i also tried to implement the data loader but the steps in order to implement it are unacceptable and i can't make it work!!
If anyone has a solution to these problems please let me know.
thanks,
stratos
Also, we strongly recommend against creating a Force.com project in the Force.com IDE directly against a production organization. Instead, you should create a project against your Developer Edition (or Sandbox) organization containing the components you want to migrate, and then use the Force.com > Deploy to Server wizard to push all the files to your production organization in a single transaction.
Jon
salesforce.com Product Manager
Thank you very much for the advice. I tried to make the test method but i can't again push it from eclipse to my production organization and i don't understand why.
Again only a part of the code is appearing. Also in my developer account in the setup for trigger and appex classes they is a option (a button "new") to create and writte directly code in the salesforce enviroment and in the production account is not existing such an option, so i am thinking that mayby i must make some changes into the profile of administration in order to handle apex???
I also paste the codes of trigger and the test method and if you have time you can check it and tell me why is not appearing into the salesforce environment?
Thank you very much!!!
stratos.
The test method:
The Trigger:
What's happening with what you describe as "only a part of the code is appearing" is this:
1. In the Force.com IDE, you created a Force.com project against your production organization.
2. You created a new Apex Trigger using the IDE's New Apex Trigger wizard.
- Behind the scenes, the IDE generated an empty trigger body and saved it to the server using the Metadata API's deploy() action
- The server allowed you to deploy this trigger to a production organization because, since it was empty, it had no untested lines.
3. You opened the new trigger in the IDE's Apex Code Editor, added some lines of code, and saved the file.
- When you saved, the IDE once again sent the trigger file to the server using the Metadata API's deploy() action
- This time, the server rejected the deploy because your new lines of trigger code were NOT tested.
Thus, all that was ever saved to the server was the initial, empty trigger body. This is why we recommend you NEVER create a Force.com project using production credentials.
Following these steps should solve your problem:
1. In the Force.com IDE, create a Force.com project using your Developer Edition credentials.
2. Create your trigger and test class.
3. In the project explorer, right-click on your test class and select Force.com > Run Tests from the context menu.
4. Confirm all your tests pass and that code coverage for your trigger is > 75%.
5. When you're ready, in the project explorer right-click on the "src" folder and select Force.com > Deploy to Server.
- In step 1, enter your production credentials.
- In step 3, deselect all components except your trigger and test class, and click Next.
- Review the deployment results to confirm your deployment was successful, or if not to see what errors the server reported.
6. In the web browser, log into your production organization and look at the trigger to confirm it was created successfully.
Your instructions were perfect i found everything. Although i must have some problem in the test method because is not running but at least now i know how to migrate apex from one account to the other.
Have a nice day!