0

We're using Dynamics 365 for Operations and I'm trying to connect to the OData Web service it exposes for CRUD operations against the entities. Using the OData Connected Service tool, I can create a Connected Service reference.

When I do this, it pulls down the metadata for the service and creates a proxy class with 970 thousand lines of code.

The url I'm using is https://[company url].sandbox.operations.dynamics.com/data/

When entering this URL into the "Add Connected Services wizard", it appends $metadata to the end of this url, and it pulls back all the metadata for every exposed entity and creates a class based on this.

Is there a way to partition the data from the AX365 side, or to somehow limit my query on the client side? I'm new to both AX365 as well as the OData Connected Service tool, so I'm not sure what is possible.

Jeff Reddy
  • 5,551
  • 9
  • 55
  • 88
  • Please go through code samples for Odata and see if help you. https://github.com/Microsoft/Dynamics-AX-Integration – Pradeep Muttikulangara Vasu Nov 28 '17 at 23:18
  • Those code samples use the same class that I'm generating. Only it looks like the one they use was created last June, when the entity list was smaller. However, their class still contains over 700k lines of code. – Jeff Reddy Dec 04 '17 at 14:15
  • I'm not familiar with this tool, but can you not generate your proxy classes based on a single entity/endpoint. For example https://[company url].sandbox.operations.dynamics.com/data/Customers where "Customers" is the public collection name of the CustCustomerEntity – rjv Jan 21 '18 at 14:47

1 Answers1

-1

You can use action in dataentity to override the function and apply any filter in the action method so when using the custom url you can get customized result on a particular data entity.

http://www.k3technical.com/odata-actions-testing-with-fiddler/

Shinya Koizumi
  • 1,003
  • 1
  • 11
  • 26
  • Look for "Add an action to OData entity" in this page then. https://learn.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/data-entities/build-consuming-data-entities – Shinya Koizumi Sep 08 '18 at 18:30