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
SF7SF7 

record type selection In the Button

Hi 

 

On account i have related list Opportunity . In this related list i am using a custom button which will Open a VF page for Opportunites . and i have series of Vf pages to complete the Opportunity.

 

Now i am trying to specify the record type also in that URL itself

 

here is the URL of My custom Button

 

 

 /apex/page/ABC_Opportunity_Wizard?accountId={!Account.Id}

 

Here are the URl 's i tried 

 

/apex/page/ABC_Opportunity_Wizard?accountId={!Account.Id}&RecordType =012L0000000CpUL

 

and i tried 

 

/apex/page/ABC_Opportunity_Wizard?accountId={!Account.Id}&RecordType =ABC

 

But no luck at all , any suggestions

 

Thanks

akhil

TheDoctorTheDoctor

URL parameters don't work for Visualforce pages the same way they do for standard pages. You need to programatically grab the paramater from the URL in your Apex Controller and assign it to a variable, then utilise as needed. Are you doing this?

 

If you're not using a customer Controller/Extension, you can use {!$CurrentPage.Parameters.InsertFieldName} as a merge field, but this isn't going to give you quiet as much flexibility.

Niket SFNiket SF
1. You can skip the record TYpe selection if you are creating the Extension to the std New functionality .

Thank you
Niks