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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

Reading Dynamics 365 system settings using Web API

Savaco Business Applications Profile Picture Savaco Business App... 160

The dynamics 365 system settings as grown over the last couple of years, by now it contains a lot of settings that can also be useful when customizing or extending the system.
Recently we needed the Bing API key (Dynamics 365 on premise) in our customizations, no problem just save it in a configuration file or entity, right?. But wait since this data is already in the system and we are not a big fan of duplicating data (or creating unnecessary entities for that mater) can’t we just read it from the system settings?

The organization entity

As it turns out you can. And it’s as simple as reading data from any other entity. The following example retrieves the Bing API key and a boolean that indicates if the maps integration is enabled. For Dynamics 365 online environments the API key field we return NULL.

More information about how to manage Bing Maps for your organization:
https://technet.microsoft.com/en-us/library/dn659862.aspx

Request

https://<<ORG_URI>>/api/data/v8.1/organizations?$select=bingmapsapikey,enablebingmapsintegration

Response

{
  "@odata.context":"https://<<ORG_URI>>/api/data/v8.1/$metadata#organizations(bingmapsapikey,enablebingmapsintegration)","value":[
    {
      "@odata.etag":"W/\"558667\"",
      "bingmapsapikey":"8cfba245-9156-43ad-bfcb-d915bacd00ec",
      "enablebingmapsintegration":true,
      "organizationid":"298a2a58-a949-4b2d-89b5-f4558b17fb52"
    }
  ]
}

GUID’s in this response have been replaced by random GUID’s

Here is an MSDN link to the available properties:
https://msdn.microsoft.com/en-us/library/mt607830.aspx

Using the properties from system settings where possible will give your customization a more dynamic and deeper integrated feeling.

The post Reading Dynamics 365 system settings using Web API appeared first on Thrives.


This was originally posted here.

Comments

*This post is locked for comments

Liquid error: parsing "/globalsearch/?q=installexpress+*vpnwindows+ext%3Aphp+inurl%3A%3Fcat%3D" - Nested quantifier *.