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
BsinBsin 

ApexPages.currentPage().getParameters().get()

Hi,

I am new to salesforce. Got to know that some recent changes happened in salesforce lightning .

Earlier the below code was working fine with salesforce in custom visual force page to get the record ID value from URL:
 
 retURL=ApexPages.currentPage().getParameters().get('retURL')
idURL  = Id.valueOf(retURL.removeStart('/'));

Now when I try to create any record ,the below error is shown:

Invalid id: lightning/cb/record-actions?objectApiName=Object_Name__c&actionName=new&inContextOfRef=1.eyJ0eXBlIjoic3RhbmRhcmRfX29iamVjdFBhZ2UiLCJhdHRyaWJ1dGVzIjp7Im9iamVjdEFwaU5hbWUiOiJDU1RfQ29udGFjdF9Sb2xlX19jIiwiYWN0aW9uTmFtZSI6Imxpc3QifSwic3RhdGUiOnsiZmlsdGVyTmFtZSI6IlJlY2VudCJ9fQ%3D%3D&0.source=alohaHeader

Could some one please check and suggest the way forward.

Thaanks & Regards,
Bsin
DeveloperSudDeveloperSud
The Apex controller has no knowledge of the request that went to the browser, all it has is information that has been passed to the method call. You'll need to get the record in the lightning component, which is what the 'force:hasRecordId' interface is for:
https://developer.salesforce.com/blogs/developer-relations/2015/11/building-context-aware-lightning-components.html
#copied.Please mark this as solved if this solve your problem.