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

Handling Data Updates and Deletions in D365FO integration

(0) ShareShare
ReportReport
Posted on by 230

Hi team,

 

 

Recently, I posted few thread on Custom service and Odata related…

 

Its not on my requirement but for future knowledge i posted the query here related to Delete and Modification data in D365FO integration.

 

 

Suppose a customer’s credit limit is initially set to 60,000 in D365FO, and the external system successfully receives this information through a custom service.

 

 

1. Update -


If we later update the credit limit to 85,000 for customer C005 in D365FO, how can this change be automatically reflected in the external system?

 

 

 

2.Delete-


Similarly, if a customer record or any related data is deleted in D365FO, how can we ensure that the corresponding data is also deleted or appropriately updated in the external system?
 

Could you please suggest the recommended integration approach to handle data updates and deletions and keep both systems synchronized?

 

Pls advise, thanks 

Categories:
  • Layan Jwei Profile Picture
    8,428 Super User 2026 Season 2 on at

    Hi,

     

    You could use business events to specify when certain fields gets updated to send a business a event with customer account and dataAreaId, then the external system can call odata to retrieve the customer information.

     

    Or if you are only interested in one field only, then u can return this field in the business event without the need to let the external system call odata again. The business event payload should be small to not affect performance. If you are interested in lots of fields then calling odata is better.

     

    Or if you are expecting lots of changes and large volume of data and you don't need the data near real time, maybe you can use recurring integration with incremental push that runs each 2 hours or each day. But that's another topic.

     

    For deletion, you can also create a delete business event, when the external system receives that business event, they know they should delete the record. No need to do any further calls back.
    For example:
    For customer deletion, you can return customer account and legal entity

    for sales order header deletion, you can return sales id and legal entity
    for salesLine deletion, you can return salesId, InventTransId, dataAreaId

     

    Thanks,
    Layan Jweihan
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future.

  • Suggested answer
    CU-1234529-002 Profile Picture
    631 on at

    Hi,

    Agree with Layan, business events are the usual way to handle both cases. Some details on how it works in practice

    1. Update: raise a custom business event when the field you care about changes. For the credit limit, that means a post-update event handler (or a Chain of Command extension) on the customer table that checks whether the credit limit differs from the original value before sending the event. This avoids sending an event on every unrelated customer update. The payload can carry the customer account, dataAreaId and the new credit limit, or just the keys so the external system calls OData to read the details, as Layan said.

    2. Delete: do the same on the delete event and send the keys (customer account and dataAreaId). The external system can then delete or deactivate its own copy without calling back. Note that many customers are blocked or inactivated rather than deleted in D365FO, so consider whether you also need an event for that status change.

    3. Make the consumer idempotent. Don't assume an event arrives exactly once or in order. The external system should be able to process the same event twice without a problem, and it can compare against the current data via OData if it needs certainty.

    4. For high volumes where near real-time isn't needed, a scheduled export (recurring integration, or exporting incremental changes with entity change tracking) is usually simpler and more reliable than one event per change.

    Refer this  https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/business-events/home-page 

  • CU29091230-0 Profile Picture
    230 on at

    Thanks for the quick response.

     

    I have already worked with custom business events in D365FO, and I understand that business events can be triggered when a record is updated or deleted to notify external systems about the change.

     

    So, based on my understanding, there are two parts to this process:


    Business Events: To notify the external system whenever a record is updated or deleted in D365FO.

     


    OData: To retrieve, update, or delete the corresponding data in D365FO, as required.

     


    Could you please confirm whether my understanding is correct?

     

    Pls advise, thanks 

  • Layan Jwei Profile Picture
    8,428 Super User 2026 Season 2 on at

    Hi @CU29091230-0 ,
     

    Yes, the process you mentioned is correct for the update scenario when the external system needs to retrieve additional customer information from D365FO.

    The business event can notify the external system that something has changed, and the external system can then call OData to retrieve the required customer information. This is particularly useful when multiple fields are needed, as the business event payload should remain small.
     However, if the external system only needs the updated credit limit, for example, you could include that value directly in the business event payload without requiring another OData call.
     

    For deletions, as mentioned earlier, the business event can include the identifiers of the deleted record, allowing the external system to identify and delete the corresponding record on its side without calling OData again.

    I hope all is clear now.

    please don't forget to verify the answers that helped

    Thanks,
    Layan Jweihan
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future.

  • CU29091230-0 Profile Picture
    230 on at

    Thanks Layan,

     

    As mentioned, it's possible to include the required data directly in the Business Event payload without making a separate OData call.

     

    - Here do you mean the" schema "that we use later in Power Automate with the Parse JSON action?

     

    For multiple records, as you mentioned, we would need to make separate OData calls in addition to using Business Events. Is my understanding correct?

     

     

    If yes, could you please provide me a reference to follow the steps ( Business event+ Odata).

     

    Pls advise, thanks 

  • Martin Dráb Profile Picture
    241,635 Most Valuable Professional on at

    Note that there are other approaches as well, such as that you can use change tracking to export the data in bulk or the other system may actively ask for changes since the last synchronization.

  • Suggested answer
    Layan Jwei Profile Picture
    8,428 Super User 2026 Season 2 on at

    Hi,
     

    I'm talking about the schema of the business event that we send from D365FO. The business event payload should be kept as small as possible.

    For example, in this standard business event, only 6 fields are returned, and RecIds aren't included either, which is perfectly acceptable.
     




    However, if you need to retrieve all sales order information, including the header and lines, then calling OData would be a better approach rather than including all that information in the business event payload.
     

    This is not related to the number of records. I'm referring to the amount of information returned in the business event itself.

    And as Martin mentioned, and as I mentioned in my first reply and in the other threads, there are other integration approaches available.

    However, we still don't have a clear understanding of your requirements. For example, do you need the data in near real time? Are you expecting frequent changes throughout the day? Is the volume of data large?
     

    These details are important before deciding which integration approach would be most suitable.

    Thanks,
    Layan Jweihan
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future.

  • CU29091230-0 Profile Picture
    230 on at

    Thanks Layan and Martin for the response.

     

     

    Do you need the data in near real time?

     

    - Based on the customer account number provided by the external system, we need to retrieve and return the relevant data for that customer from D365FO, including sales order header and line details, credit limit, and other associated information.

     

    Are you expecting frequent changes throughout the day? - NO

     

    Is the volume of data large? - In a day max five customers information retrive.

     

    Pls advise the best integration approach. thanks 

     

     

     

     

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287 Super User 2026 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 232 Most Valuable Professional

#3
Aayush Tiwari Profile Picture

Aayush Tiwari 222

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans