Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / How to automatically u...
Finance forum
Suggested answer

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

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!
  • Mar23 Profile Picture
    Mar23 52 on at
    How to automatically update the References.cs file generated from OData Connected Services library?
    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? 
  • Suggested answer
    Kevin Xia Profile Picture
    Kevin Xia Microsoft Employee on at
    How to automatically update the References.cs file generated from OData Connected Services library?
    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

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,696 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,490 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans