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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

How to automatically update the References.cs file generated from OData Connected Services library?

(1) ShareShare
ReportReport
Posted on by 52
Hi everyone!
 
We use the OData Connected Services library in our .NET Framework 4.8 project to get definitions of Dynamics 365 entities and their fields, following Microsoft articles and documentation. This library generates a References.cs file with these definitions, which we can then use in our processing. For instance, we can use SalesOrderHeaders to create sales orders on Dynamics 365.
 
Is there a way to automatically update this References.cs file when changes are made to the Dynamics 365 schema? For instance, if a field is added to the Sales Order Header? At the moment, we are adding these fields ourselves by regenerating the References.cs files and finding any discrepancies, which is very time consuming.
 
Thanks in advance!
I have the same question (0)
  • Suggested answer
    Kevin Xia Profile Picture
    Microsoft Employee on at
    Hi,
    There is no such standard feature. You can customize your development to suit your needs, comparing existing entity definitions in References.cs with retrieved metadata, and generating updates for any additions or modifications. Implement periodic scripts to execute this custom code periodically, or trigger it when changes to the Dynamics 365 architecture are detected.
    Best regards,
    Kevin
  • Mar23 Profile Picture
    52 on at
    Hi Kevin,
     
    Thanks for responding.
     
    Do you know if there is any documentation I can refer to to automatically do this? E.g. how to detect changes to Dynamics 365 architecture, or how to retrieve metadata definitions automatically? 

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 March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 657

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 453 Super User 2026 Season 1

#3
Martin Dráb Profile Picture

Martin Dráb 190 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans