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 :
Microsoft Dynamics CRM (Archived)

Populate Lookup Field via Web API

(0) ShareShare
ReportReport
Posted on by 1,799

Hi, 

First time attempting to push data to Dynamics 365 programmatically via the Web API. I need a little help with populating lookup fields. 

If I have the GUID available this isn't an issue. The following POST creates a new lead with the Currency set to Euro. 

{
"subject" : "newlead3",
"transactioncurrencyid@odata.bind" : "/transactioncurrencies(2817303a-a84c-e811-8102-3863bb341bf8)"
}

How can I achieve this if I don't have the GUID available, and my source data only contains the string value EUR? I imagine I need to lookup the isocurrencycode from the associated transactioncurrency entity and when a match is found return the GUID for the matched Record. Is this correct?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Andreas Cieslik Profile Picture
    9,267 on at

    Yes, it is correct. You cannot set currency only by it's name. As you wrote you need to fetch the guid of it first.

  • JDMCRM Profile Picture
    1,799 on at

    Hi Andreas, thanks for the response. Is there an example of how this can be achieved? I'm testing using Postman.

  • Verified answer
    Andreas Cieslik Profile Picture
    9,267 on at

    /api/data/v8.2/transactioncurrencies?$select=currencyname,isocurrencycode&$filter=contains(currencyname,'Euro')

    Results in:

    {

     "@odata.context":"crm365.domain.dev/.../v8.2$metadata#transactioncurrencies(currencyname,isocurrencycode)","value":[

       {

         "@odata.etag":"W/\"361185\"","currencyname":"Euro","isocurrencycode":"EUR","transactioncurrencyid":"695a881a-7a4f-e811-910d-00155dd55305"

       }

     ]

    }

    which includes the required guid field

  • JDMCRM Profile Picture
    1,799 on at

    Great, thanks for the help. That does what I'm after :).

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!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans