You need to sign in to do that
Don't have an account?
Calvin Ng
how can I edit an Apex Class on my production site?
I have a current Apex class in my production, I would like to do a simple tweek to one of the labels used in the Public Group.
I have done the simple change on Sandbox, and its working on Sandbox.
Somehow, I would like to do the same for my Production, but i cannot. I'm not familiar with Apex coding, but i remember it needs some deployment steps from Sandbox into Production.
I need all the guidance as I can get on this.... Any step by step guide would be really great!
2) create outbond change set in sandbox
3) add ApecClass Components you want to change set
4) upload to production and you will get an email after upload
5)Goto prouction setup--> inbound change set
6) click on your change set name and click on deploy
7)After validating classes will be deployed
for more information refer
https://trailhead.salesforce.com/en/app_deployment/app_deployment_changesets
if you already have then you can proceed to next
For Change Set: Follw this Trail head (https://trailhead.salesforce.com/en/app_deployment/app_deployment_changesets) the best way to learn in detail.
my preferred and quick way is eclipse IDE,
- Download Eclispe with force.com IDE from here (https://developer.salesforce.com/page/Force.com_IDE)
- Create you project repository from Sandbox
- Right click on the class you want to deploy and go to force.com|Deploy to server
- Enter Production credentials (security token if ip is not relaxed on you profile)
- And follow steps to deploy.
Step by step guide here (http://www.salesforcetutorial.com/use-force-com-ide/)let me know if you need any more information.
Cheers!
The username already exists in this or another Salesforce organization. Usernames must be unique across all Salesforce organizations. To resolve, use a different username (it doesn't need to match the user's email address). : [Username] Stack Trace: Class.TestUpdatePartNumber.validateTrigger: line 69, column 1 How can I overcome this, the sandbox apex are the same and are running fine in the Production. So I don’t see why they should fail from the validation? By the way, these 4 class names are in the production, should I remove them before I validate them to avoid the failures? Regards, Calvin Ng
For FIELD_INTEGRITY_EXCEPTION : are you creating user in test classes? if yes, please check that user name should be in email format ,also add some random number in user name by code DUPLICATE_USERNAME issue.
For FIELD_CUSTOM_VALIDATION_EXCEPTION these name field can be auto number and you are trying to assign some value in test class, if it is auto number you need not populate value in it.
Additionally if these calless are not user full of related to your current apex class then you can go for partial deplyment, Add your test class which is particular to your apex class (which you want to deploy) in this all test claases wont execute but only those which included in you change set, note that individual code coverge has to be either or above 75% . Later you can work on remaining test classes to get fixed.