public class RedirectNewOpptyController {
public RedirectNewOpptyController(ApexPages.StandardController controller) {
}
public pagereference navigateToURL(){
return new pageReference('/006/e?retURL=%2F006%2Fo&ent=Opportunity&opp11=Prospecting');
}
}
Override the standard 'New Button' with a visualforce page.
Also, please refer to below link which might help you further.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks for the reply Khan, Am using lightning environemnt, i dont have experience on VF. As part of my requirement, when i click on the New button on opportunity page to create new opportunity, i added one custom picklist field that needs to be pre-populated from the source of remote call. Please suggest on this.
Greetings to you!
Please try the below code, I have tested in my org and it is working fine. Kindly modify the code as per your requirement.
Visualforce:
Controller:
Override the standard 'New Button' with a visualforce page.
Also, please refer to below link which might help you further.
http://sfdcsrini.blogspot.com/2014/01/custom-button-to-pre-populate-field.html
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
Am using lightning environemnt, i dont have experience on VF.
As part of my requirement, when i click on the New button on opportunity page to create new opportunity,
i added one custom picklist field that needs to be pre-populated from the source of remote call. Please suggest on this.
I suggest you please refer to below links:
https://salesforce.stackexchange.com/questions/116697/create-record-in-lightning-with-populated-fields
https://salesforce.stackexchange.com/questions/98983/pre-populating-fields-at-record-creation-in-lightning-experience
I hope it helps you.
Kindly mark this as solved if the information was helpful. It will help to keep this community clean.
Regards,
Khan Anas