You need to sign in to do that
Don't have an account?

Programaticaly call the Visualforce page create screen using Apex
Hi,
I want to programaticaly (using Apex) call the Visualforce page create screen.
Can I use the following ?
PageReference pageRef = new PageReference('/066/e?retURL=%2Fapexpages%2Fsetup%2FlistApexPage.apexp');
Will there be guarantee this will not change for other salesforce organizations?
Is there any other way for doing it ?
Thank you
Viraj
Viraj,
Take a look at the StandardController class documentation but your code should work across orgs.
You can have a controller return a page reference to the standard edit (new) page with something like this. It's just a snippet and not the entire controller.
private Opportunity opp;public PageReference new() { return (new ApexPages.StandardController(opp)).edit();}
Jeff Douglas
http://blog.jeffdouglas.com
Appirio
Thank you Jeff Douglas for the answer.
But what I wanted is not that. I want to edit or add an Apexpage object.
This Apexpage object contains Visualforce page source code.
Viraj