Skip to main content

Notifications

Announcements

No record found.

Service | Customer Service, Contact Center, Fie...
Unanswered

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

Posted on by 417

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
    bernhards 417 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
    bernhards 417 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
    Leco Lv 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
    bernhards 417 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans