I created an overwrite for the "new"-button on a custom object via a Lightning Component. On the desktop everything works fine but the Salesforce mobile app causes some issues.

The component contains the following:

    <force:recordData aura:id="forceRecord"
                      fields="Id, Name, Street__c, PostalCode__c, City__c, Country__c"
                      mode="EDIT" />

   <lightning:button variant="brand" label="Submit" onclick="{!c.saveRecord}" />

Within the controller I execute a redirect to the created record with the following snippet:

    var tempRec = component.find("forceRecord");
    tempRec.saveRecord($A.getCallback(function(result) {
    if (result.state === "SUCCESS") {
        var navEvt = $A.get("e.force:navigateToSObject");
          "recordId": result.recordId

This works on desktop but not on Salesforce mobile app. I also tried window.location.href = '/' + result.recordId; without success.

Any ideas how I can make it work on mobile as well?

Thanks Chris


1 Answer 1


Seems not to be possible - therefore I wrote the method by my own. This solved the problem.

  • 1
    Hello Chris, that is great, would like to share a portion of your solution to help others? Nov 29, 2021 at 19:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .