You need to sign in to do that
Don't have an account?
TechMighty
How to capture record id for the record on any custom button click?
Hi, I am using standard detail page for detailed view of Order and its line items are listed in related list. In the related list of Line items, i can see standard Edit and Del Links against each record. I want to override Edit link to navigate to a new custom made detail page which will detail about the Line Item record for which the link was clicked. How can I retrieve the record Id of line item whos Edit link was clicked. Thanks, TechMighty
Have you checked if the id was passed as an URL parameter when clicking on Edit?
Also is your page a Visualforce page?
If both answers are yes, then you could easily retrieve it with
ApexPages.currentPage().getParameters()
The following example shows how to use a PageReference object to retrieve a query string parameter in the current page URL. In this example, thegetAccountmethod references theidquery string parameter:
The following page markup calls thegetAccountmethod from the controller above:
All Answers
Have you checked if the id was passed as an URL parameter when clicking on Edit?
Also is your page a Visualforce page?
If both answers are yes, then you could easily retrieve it with
ApexPages.currentPage().getParameters()
The following example shows how to use a PageReference object to retrieve a query string parameter in the current page URL. In this example, thegetAccountmethod references theidquery string parameter:
The following page markup calls thegetAccountmethod from the controller above:
Thanks very much...this solved my problem. :)