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
Francesco BigoniFrancesco Bigoni 

Lightning:navigation component does not work on mobile Salesforce app

Hi all,

I have some issues with lightning navigation component in Salesforce mobile app.
I've created a lightning component, called by a quick action from every Order detail page, that lets users quickly create a new record using Data Service and then redirects them to related page of Order Products for the created Order. Using desktop website, the component and the redirect after creating a new Order work, but in the mobile Salesforce app don't (I've tried on both Android and Iphone apps). In the mobile app, after creating a new Order, it shows this error message:

Looks like there's a problem.
An internal server error has occured
Error ID: 2036433709-13113
(-1257107540)


The lightning navigation is declared in the component code:
<lightning:navigation aura:id="navigationService" />
And the code for the navigation redirect in the Javascript controller is the following:
//After saving a record, redirects to Order Products page for the created Record
component.find("OrderRecordCreator").saveRecord(function(saveResult) {
       if (saveResult.state === "SUCCESS" || saveResult.state === "DRAFT") {
             
             //Redirect here does not work on mobile
             component.find("navigationService").navigate({
                type: "standard__recordRelationshipPage",
                attributes: {
                        recordId: saveResult.recordId,
                        objectApiName: "Order",
                        relationshipApiName: "OrderItems",
                        actionName: "view"
                }
            });
       }
       else if (saveResult.state === "INCOMPLETE") {
               console.log("User is offline, device doesn't support drafts.");
       }
       else if (saveResult.state === "ERROR") {
               console.log('Problem saving order, error: ' +
                            JSON.stringify(saveResult.error));
       }
       else {
               console.log('Unknown problem, state: ' + saveResult.state +
                           ', error: ' + JSON.stringify(saveResult.error));
       }
});
Thank for your patience and assistance.