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
Sergey Murashko 1Sergey Murashko 1 

Mobile app doesn't pass state

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

Sergey Murashko 1Sergey Murashko 1
User-added image
Sergey Murashko 1Sergey Murashko 1

To retrieve the state I use:

  @wire(CurrentPageReference)
  setCurrentPageReference(currentPageReference) {
    //This is that JSON string
    this.currentPageReferenceeText = JSON.stringify(currentPageReference);
    this.jobId = currentPageReference.state.c__jobId;
  }

Sergey Murashko 1Sergey Murashko 1
Please help it's killing me!
Muzaffar Mahmood 1Muzaffar Mahmood 1
I have exactly same problem. Anyone from salesforce to solve it?