You need to sign in to do that
Don't have an account?
Hugh Rainey
How do I develop a visualforce page in an active org
I'm a newb when it comes to developing on the SF platform. I've got experience with web application development, but like I said, I'm new to this.
So I'm trying to create a VF page that will renderas="pdf". The information will come from the Account sObject that will have use the information from custom fields. It'll be really easy to make accept for that I can't make an pages in an active org.
I start the dev console > New > Visual Force page
The console looks like its already to go, but I can't save as an alert box pops up with the following:
Deployment Failed
Can't alter metadata in an active org
Right now the only thing that is typed into the editor is:
<apex:page>
</apex:page>
So how do I go about developing a page?
So I'm trying to create a VF page that will renderas="pdf". The information will come from the Account sObject that will have use the information from custom fields. It'll be really easy to make accept for that I can't make an pages in an active org.
I start the dev console > New > Visual Force page
The console looks like its already to go, but I can't save as an alert box pops up with the following:
Deployment Failed
Can't alter metadata in an active org
Right now the only thing that is typed into the editor is:
<apex:page>
</apex:page>
So how do I go about developing a page?
Development can't be done in an active Org. You will have to "cut" a developer sandbox and develop it there. Then you can create a "Change Set" and add the page and related components to the change set and send it to the production organization.
You will need to have 75% test coverage in order to push Apex code to production.
Create a sandbox: Setup > Data Management > Sandboxes > New Sandbox
You can login with your original login information plus the name of the sandbox. For example, if my login was joey@example.com and my sandbox's name was "Dev" then I would login as joey@example.com.dev with my same password. (Also, instead of login.salesforce.com, you use test.salesforce.com).
To create a Change Set, go to Setup > Deploy
Reach out if you need more direction!
So I created the sandbox. I had kinda thought when that was done it would mirror the objects that already exist in our production org. That is not the case. A couple of questions.
1) Is there a way to import the objects that we've created in our active org so that this work doesn't have to be duplicated?
2) If not, when I go to Deploy the change set, will the objects that I've created overwrite the existing objects, and will there be data loss?
Refreshing a sandbox will duplicate the components into your sandbox. More information can be found at following link :
https://help.salesforce.com/HTViewHelpDoc?id=data_sandbox_create.htm&language=en_US
http://help.salesforce.com/HTViewHelpDoc?id=data_sandbox_manage.htm&language=en_US
https://help.salesforce.com/HTViewHelpDoc?id=data_sandbox_implementation_tips.htm&language=en_US
https://help.salesforce.com/HTViewHelpDoc?id=create_test_instance.htm&language=en_US
Thanks,
Amit Bhardwaj
Change sets never cause data or meta-data loss. The only time loss in incurred is when you have changed something (in other words you overwrite existing data). For example, if you create a field in production and a completely different field with a different name in the sandbox, then deploy the entire object, both fields will appear in production. In the sandbox, only the field created there will exist.
I just reread your post and maybe you meant to say that your records didn't come over? Yes, your records are not copied to a developer sandbox. You can use the dataloader (Setup > Data Management > DataLoader) to export from production and import into your sandbox if you want actual data. Keep in mind the storage in a sandbox is very small. Typically you want to create new data from scratch to test with.
I checked right after Amit responded and the fields had ported over. I appreciate your guys fast response on these issues. Nice community support.
I've got a seperate question but I should probably ask it under a different post since it doesn't deal with the same issue. Is that a good appropriate, or can I ask underneath this thread?
It would be highly appreciated if you could post your query in a new post.
Also, if you could select the best answer, so that other can refer that for future reference.
Thanks,
Amit Bhardwaj