1

I have a custom list of Products which appear in Salesforce in both mobile and desktop.

When the user clicks on the button in the list:

<lightning:button label="{!r.Name}" value="{!r.Id}" onclick="{! c.navigateToProduct }" variant="base" />

It calls this JavaScript controller method:

navigateToProduct: function (cmp, event, helper) {
    let recordId = event.getSource().get("v.value");
    var navEvent = $A.get("e.force:navigateToSObject");
    navEvent.setParams({
        "recordId": recordId,
        "slideDevName": "related"
    });
    navEvent.fire();
}

But when clicked from mobile (Salesforce1 or web) the Product page fails to load:

enter image description here

But when I try from a desktop computer it loads fine.


I have also tried using a plain anchor tag, which did not work:

<a href="{!r.url}">{!r.Name}</a>

And I've tried using window.location.href, which did not work.


What am I doing wrong? How can I link to a product in a way that works on mobile?

1 Answer 1

3

It turns out that it is not possible to view a Product record via mobile or Salesforce1

There is a Salesforce Idea: Allow Products / Pricebooks to be displayed in Salesforce1 app

You must log in to answer this question.

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