How to Read the current Model-driven App details using client API references

InogicDyn365CE2 years ago6 Views


Introduction:

In a recent project while working on client-side scriptings, we had come across a requirement where we interact with Dynamics 365 CRM data using WebAPI and query expressions. In most cases, we needed the current Model-driven app AppId to build the WebAPI URLs. We had achieved this by using Dynamics CRM Client API references.

With the help of Client API references, we can read the current Model-driven app details. Please find the Client API references below, using which we can get the current Model-driven app details.

  1. getCurrentAppProperties

With the use of getCurrentAppProperties client API reference, we can get the current Model-driven app details. Please find the code below:

var globalContext = Xrm.Utility.getGlobalContext();

globalContext.getCurrentAppProperties().then(

function successCallback (appDetails) {

alert('App Details found');

}, function errorCallback() {

alert('Error');

});

client API reference

  1. getCurrentAppName

With the use of getCurrentAppName…



Source link

Leave a reply

Join Us
  • X Network2.1K
  • LinkedIn3.8k
  • Bluesky0.5K
Support The Site
Events
February 2025
MTWTFSS
      1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28   
« Jan   Mar »
Follow
Sign In/Sign Up Sidebar Search
Popular Now
Loading

Signing-in 3 seconds...

Signing-up 3 seconds...