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 :
Dynamics 365 general forum

Storing configuration data in dynamics 365

(0) ShareShare
ReportReport
Posted on by

I need to store an external api's url in dynamic 365. Recommended ways I have found are storing it in a Key Value Pair entity or configuration entity.But I dont know how to implement/use them. I need some guidance about their implementation.Any help would be much appreciated.

Categories:
I have the same question (0)
  • Suggested answer
    T.I.A Profile Picture
    1,760 on at

    If you create a new entity (name is up to you) you can use a text field for your API URL. So the entity has:

    Name: name of external API

    URL: string field to hold the URL of your choice.

    Now whenever you are developing etc you can query that entity by name and bring back the URL value for whatever you need to do. Let me know if this helps

  • Verified answer
    Priyesh Profile Picture
    7,396 User Group Leader on at

    Hi,

    Usually, it's a good idea to create an entity just for Configuration. You can have a field in the same in which you can store this key in a string field. And then also make this field as Field-level security enabled for only System Administrators to be accessible/readable.

    Supposedly, you will have a user's credentials that will access this api key, that user should be added to the access as well.

    Hope this helps.

  • Community Member Profile Picture
    on at

    Thanks T.I.A and Priyesh Wagh. I have created a custom entity and stored configuration data n its fields. Can you please help me in writing the query for fetching data from this custom entity in javascript.

  • Verified answer
    T.I.A Profile Picture
    1,760 on at

    docs.microsoft.com/.../retrieverecord this article should get you going.

  • Suggested answer
    Priyesh Profile Picture
    7,396 User Group Leader on at

    If you want to write a FetchXML in your query, you can simply query using Advanced Find and then download the FetchXML.

    Hope this helps.

  • Community Member Profile Picture
    on at

    I'm  still unable to fetch data. the queries I have tried are
    1)window.parent.Xrm.WebApi.retrieveRecord("cml_configuration", "c82fbee3-6b97-e911-a995-00224800cc7a", "?$select=name").then(
    2)window.parent.Xrm.WebApi.retrieveMultipleRecords("cml_configuration", "?$select=name&$top=3").then(
    but none has worked. Although I dont want to hard code the record id but in an attempt to make it work I even hard coded it in the first query.This is the screenshot of my entity record

    ConfigurationRecord2.png

  • T.I.A Profile Picture
    1,760 on at

    do you get any errors?

  • Community Member Profile Picture
    on at

    Error details are

    1. code: 2147951872
    2. errorCode: 2147951872
    3. innerror: undefined
    4. message: ""
  • Community Member Profile Picture
    on at


    Thanks T.I.A. It worked. I was passing wrong select parameters.

  • Suggested answer
    Dharanidharan Profile Picture
    638 Super User 2025 Season 2 on at

    You can fetch the records from that custom entity using query expression or fetch XML by passing the configuration key name

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

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

Leaderboard > Dynamics 365 general

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans