• Andrea Voggenreiter 38
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
I have embedded a custom lightning component on the record page of "Case". When I use the "Methods of Navigation Items" and "Methods for Workspace Tabs and Subtabs" within the "Methods for Lightning Experience" (https://developer.salesforce.com/docs/atlas.en-us.api_console.meta/api_console/sforce_api_console_methods_lightning.htm) then I get results when opening the Case in the Service Console, but I do not get any when I open the Case in the Sales Console.
For example, the function "isConsoleNavigation" gives me 'true' in the Service Console, but 'false' in the Sales Console.
Service and Sales Cloud are slightliy differently set up, but as the "Case" record is also embedded in a Navigation Bar I wonder why it is not possible to call the Navigation Bar Items. Is it because the Workspace API is embedded in the component and not directly linked to the Navigation Bar?
Is there a workaround available?
I have produced a lightning component and implemented it on the Case record page. Within the code I try to get the menu item via "getSelectedNavigationItem" similarly to how it is described in https://developer.salesforce.com/docs/atlas.en-us.api_console.meta/api_console/sforce_api_console_lightning_getSelectedNavigationItem.htm.

When I try it out in the Sales Console, this line still works:
var navigationItemAPI = component.find("navigationItemAPI");
but for this piece

navigationItemAPI.getSelectedNavigationItem().then(function(response) {
console.log(response);
})
.catch(function(error) {
console.log(error);
});
it does not log the response, but throws the error "Unable to find Lightning Console App".

However, it works fine within the Service Console.

What could be the reason for this behaviour?
I have embedded a custom lightning component on the record page of "Case". When I use the "Methods of Navigation Items" and "Methods for Workspace Tabs and Subtabs" within the "Methods for Lightning Experience" (https://developer.salesforce.com/docs/atlas.en-us.api_console.meta/api_console/sforce_api_console_methods_lightning.htm) then I get results when opening the Case in the Service Console, but I do not get any when I open the Case in the Sales Console.
For example, the function "isConsoleNavigation" gives me 'true' in the Service Console, but 'false' in the Sales Console.
Service and Sales Cloud are slightliy differently set up, but as the "Case" record is also embedded in a Navigation Bar I wonder why it is not possible to call the Navigation Bar Items. Is it because the Workspace API is embedded in the component and not directly linked to the Navigation Bar?
Is there a workaround available?
I have produced a lightning component and implemented it on the Case record page. Within the code I try to get the menu item via "getSelectedNavigationItem" similarly to how it is described in https://developer.salesforce.com/docs/atlas.en-us.api_console.meta/api_console/sforce_api_console_lightning_getSelectedNavigationItem.htm.

When I try it out in the Sales Console, this line still works:
var navigationItemAPI = component.find("navigationItemAPI");
but for this piece

navigationItemAPI.getSelectedNavigationItem().then(function(response) {
console.log(response);
})
.catch(function(error) {
console.log(error);
});
it does not log the response, but throws the error "Unable to find Lightning Console App".

However, it works fine within the Service Console.

What could be the reason for this behaviour?