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
Nizam SaifiNizam Saifi 

How to get id from salesforce community URL

Hi All, I want to get id from parameter in salesforce community into apex controller but not able to get it. I tried to use ApexPages.currentPage().getParameters().get('id') but it is not working 
Hi Nizam,

If you're using API version 43 and up, you can implement lightning:isUrlAddressable interface and use pageReference attribute. A good example of this was posted here ( Below is a recap of the example provided:
Example - Component Assume url is https://<instance><namespace>__componentName?testAttribute=abc

Lightning Component:
<aura:component implements="lightning:isUrlAddressable">
   <aura:handler name="init" value="{!this}" action="{!c.doInit}" description="Handler for valueInit event fired when the component has been initialised"/>

    doInit : function(component, event, helper) {

Page Reference Types: