You need to sign in to do that
Don't have an account?
AichaSF
lightning Component - URL - passing parameter
Hello,
I have a lightning component that retrieves a phone parameter from the URL:
https:/XXXXX/lightning/cmp/c__LC01_ContactFoundCTI?telephone=+3312345
My Cmp code:
Can someone help me.
I have a lightning component that retrieves a phone parameter from the URL:
https:/XXXXX/lightning/cmp/c__LC01_ContactFoundCTI?telephone=+3312345
My Cmp code:
<aura:component controller="LCN01_ContactFoundCTI" implements="lightning:isUrlAddressable" access="global"> <aura:handler name="init" value="{!this}" action="{!c.doInit}" /> <aura:attribute name="telephone" type="String" /> <aura:attribute name="ContactNum" type="Decimal" /> <aura:attribute name="erreur" type="String" /> <aura:attribute name="show" type="boolean" default="true" /> <div class="slds-modal__header"> <aura:if isTrue="{!v.show}"> <h2 class="slds-text-heading--medium" >Recherche de Contact en cours</h2> </aura:if> <h2 class="slds-text-heading--medium" >phone = {!v.pageReference.state.telephone}</h2> <h2 class="slds-text-heading--medium " > {!v.erreur}</h2> </div> </aura:component>The test does not recover the phone.
Can someone help me.
As per the documentation you need to use C__ to retrive the parameters if i'm not worng
https://developer.salesforce.com/docs/component-library/bundle/lightning:isUrlAddressable/documentation
Try using
I hope you find the above solution helpful. If it does mark as best answer to help others too.
Thanks,
Ramesh D
https://wedgecommerce.com/lightningnavigation-lightning-component/
https://thewizardnews.com/2018/08/02/url-hack-functionality-lightning/
https://rajvakati.com/2018/11/13/navigate-to-component-using-lightningnavigation/
https://rajvakati.com/2018/05/29/navigation-in-lightning-experience-using-pagereference/
http://simpluslabs.com/how-to-use-lightningnavigation-to-navigate-another-component/