I am having a simple redirection from lwc to aura component. In LWC Js:

        type: "standard__component",
        attributes: {
            componentName: "c__OrderLinesUiFullPage"
        state: {
            c__orderId: "test"

And the aura component:

<aura:component implements="flexipage:availableForAllPageTypes,lightning:isUrlAddressable" access="global" >
    <aura:attribute type="String" name="orderId"/>
    Hello {!v.orderId}

The redirection works fine. But the attribute - the orderId - is not passed successfully. I have followed the instructions provided by document to add c__ before the attribute name but it still doesn't work. Any thoughts?

1 Answer 1


You need to add this in your aura component:-

    init: function(cmp, evt, helper) {
        var myPageRef = cmp.get("v.pageReference");
        var firstname = myPageRef.state.c__orderId;
        cmp.set("v.orderId", firstname);

The attribute value is getting passed, but it needs to be set. Use init handler in your aura component markup.

<aura:handler name="init" value="{!this}" action="{!c.init}"/>    
<aura:attribute type="String" name="orderId"/>
        Hello {!v.orderId}

enter image description here

  • Wonderful help!
    – karan
    Commented Dec 28, 2022 at 9:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .