+ Start a Discussion
sp13sp13 

call standard button url

i have 2 record types for Reservation__c: Rent & Reserve

if i select Rent, i want to get the url. how can i call it from an apex class?
PageReference gotomain = new PageReference('what is the url here?') ;
Best Answer chosen by sp13
CyberJusCyberJus
You can do it through URL hacks:

{ObjectPrefix}/e?RecordType={RecordTypeId}&ent={Object}

ie: /500/e?RecordType=012E0000000TpW3&ent=Case

All Answers

Venkat PolisettiVenkat Polisetti
I believe, you are trying to do this from a VF page. How are you selecting the "Rent" record type? Can you explain more?
CyberJusCyberJus
You can do it through URL hacks:

{ObjectPrefix}/e?RecordType={RecordTypeId}&ent={Object}

ie: /500/e?RecordType=012E0000000TpW3&ent=Case
This was selected as the best answer