Microsoft Dynamics 365 Finance and Operations uses Number Sequences to generate unique identifiers for entities like Sales Orders. The goal is to expose an API endpoint that retrieves the next available number for a specific Number Sequence (e.g., Sales Orders) and return it to external systems (such as Dynamics 365 Sales via Power Automate).
You need to create a Data Entity that will call the NumberSeq
framework to fetch the next number.
CustomNumberSequenceQuery
.CustomNumberSequenceEntity
.CustomNumberSequenceQuery
.CustomNumberSequenceEntity
.Is Public = Yes
(to allow OData access).Modify the entity’s logic to call the Number Sequence framework.
csharp
Modify the Data Entity to expose the method.
ruby
To ensure Dynamics 365 Sales retrieves the next number from FinOps:
Instead of exposing a new Data Entity, you could:
However, for direct API-based integration, the custom OData API approach is the most efficient.
This solution ensures that Sales Orders in Dynamics 365 Sales and FinOps use the same Number Sequence, preventing mismatched IDs.
André Arnaud de Cal...
294,459
Super User 2025 Season 1
Martin Dráb
233,066
Most Valuable Professional
nmaenpaa
101,158
Moderator