I have created a detail page button of Custom source as URL that has below URL


That is unable to get hold of ID in the VF page. Can someone help please?

  • Are trying to fetch the id in vf page like by getparameterby('id')? – Maruf Bagwan Mar 11 '15 at 8:29
  • 1
    you'll need to post the relevant (and only the relevant - no code dumps please) bits of the corresponding VF page and VF controller (if any) – cropredy Mar 12 '15 at 1:54
  • Is Compliance_Incident_abv__c a custom object? If yes & if the detail page button is on the Compliance_Incident_abv__c record itself, then your url should work. If Compliance_Incident_abv__c is a custom lookup or master-detail field then try this /apex/ComplianceIncidentPublish?Id={!Compliance_Incident_abvId__c} – SF Ninja Oct 27 '15 at 19:41

Have you tried using this on the VF page:


Or this in your actual APEX:


See VF page param here: https://www.salesforce.com/docs/developer/pages/Content/pages_quick_start_query_params_getting.htm

and ApexPage APEX method here: https://www.salesforce.com/docs/developer/pages/Content/apex_System_ApexPages_currentPage.htm


The parameter you are passing is "Id" and you are checking for "ID"!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.