You need to sign in to do that
Don't have an account?

Get standard controller ID from extension controller
Here is a reduced snippet of what I have so far:
<apex:page standardController="Case" extensions="NrtListController"> <apex:param name="caseID" value="{!Case.id}"/> Standard CaseID: {!Case.id} Extension CaseID: {!CaseNrt} </apex:page> public class NrtListController { public NrtListController(ApexPages.StandardController controller) {} public String getCaseNrt(){ return System.currentPagereference().getParameters().get('caseID'); } }
This page returns
Standard CaseID: 500T0000002mTLlIAM
Extension CaseID:
How can I get the current objects ID to the extension controller (The extension CaseID should be the same as the Standard CaseID)?
Thanks,
Matt
Hi, I am not sure about your use case but document says you cannot use <apex:param> in this way. There is an easy way to get record id in extension controller.
Thanks,
Lakhan
All Answers
Hi, I am not sure about your use case but document says you cannot use <apex:param> in this way. There is an easy way to get record id in extension controller.
Thanks,
Lakhan
Thanks,
The only change I had to make to that was
else it would throw some error "Incompatible types since an instance of Id is never an instance of SOBJECT".
Got this error.
System.NullPointerException: Attempt to de-reference a null object
Class.accountcustomsave4.<init>: line 28, column 1