You need to sign in to do that
Don't have an account?
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:
When I use Browser:
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;
}