function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
GoForceGoGoForceGo 

Deploying Apex Question

I am not clear on how to deploy Apex from developer to a production org.

Specifically, I am looking at the following documentation....

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_deploying_code.htm

It appears that Apex Classes and triggers must be in a local directory on my machine to use the Ant tool (see understanding CompileAndTest and reference to basedir and the sample directory provided with the Ant download)

Am I supposed to copy them over from developer org to my local hard drive?

I would have thought that somwhere I would provide username/password for my developer org and another username/password for my production org and the system would deploy from developer to production. Seems like I only provide username/password for my production org and the ant tool expects the apex files to be on my local machine...


TehNrdTehNrd
I wouldn't recommend using the Ant tool, while it does have its uses, it is not the most user friendly piece of software in the world.

The easiest way is to use the Eclipse toolkit:

 http://wiki.apexdevnet.com/index.php/Force.com_Toolkit_for_Eclipse

Build a project and then right click on it and select either Apex/Force.com and then Deploy. You enter the credentials of the org you want to deploy to and then it is a simple wizard.





Message Edited by TehNrd on 01-09-2008 11:26 AM
GoForceGoGoForceGo
Thanks. When it asks for SOAP end point, I put in

https://www.salesforce.com/services/Soap/u/10.0

as per the documentation, but it is unable to connect to it.

I am able to synchronize the code though (so connection/firewall isn't an issue)




TehNrdTehNrd
Try 11.1 that is the most recent.
GoForceGoGoForceGo
Still can't connect with 11.1


TehNrdTehNrd
Have you been able to build a project yet? Or have you made it to the deploying part?

If you have been able to build a project, what type of org is it (sandbox, dev)?

What error are you getting if any?
GoForceGoGoForceGo
I do have a project with Apex Classes and Triggers that is linked to a developer org (if that's what you mean by "able to build"). The code works well in the developer org.

I want to move this to an EE org.

When I right click on the  project and select apex/deploy to salesforce, Step 1 of 5 (Destination Details) asks for username/password - I enter the EE org username/password. The SOAP endpoint - I entered https://www.salesforce.com/services/Soap/u/10.0 or 11.1, but it says "Unable to create connection with given destination settings"...




TehNrdTehNrd
Hmm. Starting to run out of ideas. Someone from salesforce.com might have to jump in so I will ask some questions that I know they will ask.

- What version of Eclipse.
- What version of Toolkit (Help > Manage Updates > Expand the explorer in the left box, look for either Force.com Toolkit or Apex Toolkit.
- Have you purchased the Apex upgrade for EE?

Sorry I couldn't help more.
GoForceGoGoForceGo
I just figured it out...it is the stupid security token...


TehNrdTehNrd
Doh, shoud have thought of that. Glad it work......it worked right?
GoForceGoGoForceGo
I am at step 3....

I had to upload a package with all custom objects and for some reason, some of the fields referenced in Apex code were left out of the upload....I am working through the issues.

Thanks for your help.

GoForceGoGoForceGo
Yes it did work. Thanks again.


TehNrdTehNrd
No problem.



p.s. Salesforce, this is now on page 2, but there is no link to go to page 1. Please add this functionality. I know it is possible because I have seem other boards running on litium that can do this.
GoForceGoGoForceGo
Okay, now that I have it deployed on EE, I am wondering about following.:

i am actually a developer, building a product.

I am deploying it on EE so that i can do demos for prospects. I need to be able to demonstrate 4-5 different roles using the application - developer org only has two users. (My EE account is a test account as well created by Salesforce).

I am wondering if there is any reason I shoud develop on Developer org at all? Or just do my development and prospect demos on the EE org. Of course, EE org license is for limited time...




TehNrdTehNrd
Depends on how the EE org is setup. If it conforms to production rules you will have to constantly be editing your test classes to keep up with your triggers.

Where in a dev/sandbox/etc you can build all sorts of triggers with out having to worry if they are covered in tests.
GoForceGoGoForceGo
I suspect my EE org doesn't conform to "Production Rules" - I was able to deploy without having any test scripts/coverage.

When a real customer that i sell to deploys, I assume it will be a real production org and I will have to provide the 75% coverage.


TehNrdTehNrd
Yup, if you were able to deploy with out test then it does not conform to production rules. In that case I would just dev in the EE account as you will have better data, more users, etc.
AIRAIR
GoForceGo,
 
I am reviewing your post regarding unable to deploy Apex from developer to a production org.  I got exactly the same message "Unable to create connection with given destination settings."  You said you figured it out and it was the studpid security token.  Would you like to share the details with us?  I will appreciate it.
 
Thanks 
GoForceGoGoForceGo
You need to append the "security token" to your password.

If you don't know your security token, reset it by going to setup->my personal information->Reset my security token. Your token will be e-mailed to you which you can append.




knicholsknichols
How do I get my security token in production?  In the sandbox I have a link to reset it, which emails it to me, but I don't have that option in production.
mahimahi

Hi,

whenever i select  Apex | Replace file with latest from server , an exception is thrown:
" Unable to load document from Salesforce
Reason : NullPointerException "
please help me out.
 
Thanks,
Mahi
 
 
 
mahimahi

During deployment from dev org to sandbox environment, I appended security token to my sandbox password but still it is not connecting...

"Unable to create connection with given destination settings."

I have rest security token too. Still its not working..

GoForceGoGoForceGo
The only other thing I can think of is firewall/proxy settings.