0

I have a link on my lightning component that opens a record in a new tab.

I need to modify this link so that the record opens in a primary tab in the lightning service console. Please advice how can I achieve this?

1 Answer 1

0

Are you using navigateToURL to open your record? if yes,try using relative url when redirecting to record,for example:

var urlEvent = $A.get("e.force:navigateToURL");
        urlEvent.setParams({
            "url": '/'+recordId,
            "target": "_top"

        });

        urlEvent.fire();

Using "target": "_top" might help. Please let me know if it works.

2
  • Thanks for your response. I applied this solution but it opens a subtab instead of a primary tab. Please advice how can I open the record in a primary tab.
    – user51241
    Jul 6, 2018 at 12:53
  • Have you tried removing target attribute and just using the relative url instead?
    – Isha
    Jul 9, 2018 at 6:27

You must log in to answer this question.

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