• Muzaffar Mahmood 1
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
Hi,
I created a custom lightning record page and replaced my custom objects's record page with this custom page. It is working fine in Desktop but in mobile app the record page is still old although i have assigned new custom lightning page to both desktop and mobile form factor and for all apps. Is there anything else to do to change in mobile app too?
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.
Hi,
I created a custom lightning record page and replaced my custom objects's record page with this custom page. It is working fine in Desktop but in mobile app the record page is still old although i have assigned new custom lightning page to both desktop and mobile form factor and for all apps. Is there anything else to do to change in mobile app too?

Hi all, I have faced an issue for Salesforce mobile app. When I use my app via browser (mobile and desktop) it works fine. But when I use Salesforce mobile app from Google Market my custom app doesn't send a state when I use NavigationMixin.Navigate (standard__navItemPage).

My code:

 newApplication() {
    this[NavigationMixin.Navigate](
      {
        type: "standard__navItemPage",
        attributes: {
          apiName: "New_Application"
        },
        state: {
          c__jobId: this.jobId
        }
      },
      true
    );
  }

When I call the method via the mobile SF app I navigate to the New_Application without the state. But when it runs via google chrome browser (from pc and phone) the state passing correctly.

I output the state for this case a top of the page:

mobile APP:

User-added image

When I use Browser:

User-added image