When we run this, we see in passing a variable into the first parameter(appName), it gives us several pieces of information, including the appId, displayName, uniqueName, url, webResourceId, webResourceName, welcomePageId and welcomePageName function appName() { var globalContext = Xrm.Utility.getGlobalContext(); globalContext.getCurrentAppProperties().then( function success(app) { console.log(app); }, function errorCallback() { console.log("Error"); }); } async function CheckAppNameForSpecificValue() { returnBoolVal = false; var globalContext = Xrm.Utility.getGlobalContext(); await globalContext.getCurrentAppName().then(function (appName) { if (appName.displayname.toLowerCase() == 'myappname') { returnBoolVal = true } }, function (error) { ...
Comments
Post a Comment