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 421

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?

  • bernhards Profile Picture
    421 on at
    RE: dynamics 365 customer service workspace open a new workspace tab with javascript

    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);

  • bernhards Profile Picture
    421 on at
    RE: dynamics 365 customer service workspace open a new workspace tab with javascript

    Hi Leco Lv

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

  • Leco Lv Profile Picture
    on at
    RE: dynamics 365 customer service workspace open a new workspace tab with javascript

    Hi partner,

    Are you referring to creating new tabs?

  • bernhards Profile Picture
    421 on at
    RE: dynamics 365 customer service workspace open a new workspace tab with javascript

    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?

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,884 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,758 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans