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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

we need app name with javascript

(0) ShareShare
ReportReport
Posted on by 5

We are using below script for getting app name

function appName()
{

var appName;
var globalContext = Xrm.Utility.getGlobalContext();
globalContext.getCurrentAppName().then(
function success(app)
{
appName = app.uniqueName;
console.log(appName);
},
function (error) {

appName = "";

}
);
alert(appName);

}

But result is "undefined"

Expected result is "appname"

I have the same question (0)
  • Verified answer
    Bipin D365 Profile Picture
    28,985 Moderator on at

    Hi,

    You code does not seems to be correct. Please try below code -

    async function CheckAppForSpecificName(){

    retVal = false;

    var globalContext = Xrm.Utility.getGlobalContext();

    await globalContext.getCurrentAppName().then(function(appName){if(appName=='MyAppName'){retVal = true}}, function(err){console.log('err ' + err.message)});

    return retVal;

    }

    dynamicsjourney.wordpress.com/.../

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

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

#1
11manish Profile Picture

11manish 36

#2
Mallesh Deshapaga Profile Picture

Mallesh Deshapaga 32

#3
ManoVerse Profile Picture

ManoVerse 30 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans