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

Announcements

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
    Microsoft Employee 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
Suriyanarayanan V Profile Picture

Suriyanarayanan V 22

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 18 Super User 2026 Season 1

#3
CU19070926-0 Profile Picture

CU19070926-0 13

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans