+ Start a Discussion



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:
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,
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:
#copied.Please mark this as solved if this solve your problem.