web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Unanswered

dynamics 365 customer service workspace open a new workspace tab with javascript

(0) ShareShare
ReportReport
Posted on by 423

Hello experts,

I ask for help to open a new tab inside a customer service workspace session. What I tried and failed:

While focused a case

const focusedSession = Microsoft.Apm.getFocusedSession();

var tabInput = {
    templateName: "test_tab",
    appContext: new Map().set("etn", "contact").set("recordId", "03df6947-eb7a-ed11-81ad-6045bd886b00"),
    isFocused: true
};
await focusedSession.createTab(tabInput).then((tabId)=>{
    console.log("created tab with id "   tabId);
}, (error)=>{
    console.log(error);
});

The code above does execute without an error, but also without opening a new tab.

What I require:

const focusedSession = Microsoft.Apm.getFocusedSession();

};
await focusedSession.createTab("www.internal.site").then((tabId)=>{
    console.log("created tab with id "   tabId);
}, (error)=>{
    console.log(error);
});

Is it possible to open a internal HTTPS page inside a tab?

I have the same question (0)
  • bernhards Profile Picture
    423 on at

    Can anyone explain what this parameter does?

    templateName: "test_tab",

    I don't have a template (because I don't know what that means) or such. Maybe this is the reason?

  • Leco Lv Profile Picture
    on at

    Hi partner,

    Are you referring to creating new tabs?

  • bernhards Profile Picture
    423 on at

    Hi Leco Lv

    yes, I want to create a new tab inside an existing session in the app customer service workspace

  • bernhards Profile Picture
    423 on at

    I solved the problem by using the application tab, that has to be defined before the usage in the customer service app (this happens in the Customer Service Admin Center).

    // 1. Step: Get the focused session
    const focusedSession = Microsoft.Apm.getFocusedSession();
    
    // 2. Step: Define the tab to open
    const tabInput = {
        templateName: "Name-of-your-template",
        appContext: new Map().set("entityName", "account").set("entityId", entityId),
        isFocused: true
    };
    
    // 3. Step: Open the tab in the focused session
    focusedSession.createTab(tabInput);

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 55 Super User 2025 Season 2

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 27 Most Valuable Professional

#3
Soundari Profile Picture

Soundari 15

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans