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
Muzaffar Mahmood 1Muzaffar Mahmood 1 

@wire(CurrentPageReference) pageRef is not working in Salesforce1 mobile app.

I am working on Salesforce LWC in Salesforce1 mobile app. Lwc core functionality @wire(CurrentPageReference) pageRef; is throwing following error on console and i am unable to get recordId from previous page.

I am doing this to get recordId.

 

@wire(CurrentPageReference) getPageRef(pageRef){

    this.recordId = pageRef.state.c__rid;

  }

 

passing recordId from previous page like this:

 

        this[NavigationMixin.Navigate]({

          type: "standard__navItemPage",

          attributes: {

            apiName: "Line_Item_Detail_Page",

          },

          state: {c__rid: this.id}

        });

---------------------------------------------------------------

 

Error: [LWC error]: Invalid event type "WireContextEvent" dispatched in element <c-lineitemdetail-header-component>. Event name must 1) Start with a lowercase letter 2) Contain only lowercase letters, numbers, and underscores

<c-lineitemdetail-header-component>

    at Object.logError (aura_proddebug.js:4268)

    at ConstructionEstimation.dispatchEvent (aura_proddebug.js:7622)

    at ConstructionEstimation.wrappedMethod [as dispatchEvent] (aura_proddebug.js:12985)

    at WireEventTarget.dispatchEvent (aura_proddebug.js:9501)

    at d.get (contextService.js:2)

    at eval (contextService.js:2)

    at E (contextService.js:2)

    at Object.t.getContextValue (contextService.js:2)

    at c.getCurrentPageReference (pageService.js:2)

    at eval (navigation.js:2)

 

 

On desktop and mobile via chrome browser it is working fine even though there is this error in console. But in Salesforce1 mobile App it is not working due to unable to get recordId from pageRef. I tried to find way to debug Salesforce mobile app but i could not find any way to debug mobile app.

Thanks in advance.