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 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?

Categories:
  • bernhards Profile Picture
    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
    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
    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
    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

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

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

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard >

Featured topics

Product updates

Dynamics 365 release plans