web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Maintaining business event log

(0) ShareShare
ReportReport
Posted on by

Hi experts

Hope you are doing good.

I am working on business event. Just wanted to check , in D365 how we'll get/maintain business event log?

Requirement:

Wanted to trigger business event on sales order work complete. I am able to trigger business event using below code but wanted to maintain log (success/ failure work complete log ) for each work complete business event.

Could you please help on it.

Thanks.

SalesWorkCompleteBusinessEvent businessEvent = SalesWorkCompleteBusinessEvent::newFromWorkTable(workTable); // SalesWorkCompleteBusinessEvent - business event custom class


if(businessEvent && workTable.workId)
{
businessEvent.send();
}

I have the same question (0)
  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Priya_D365,

    What do you mean on success/failure work complete log? Do you want to have a business event log with the list of all send\failed events?

  • Suggested answer
    Sukrut Parab Profile Picture
    71,710 Moderator on at

    There is no success / failure log . If there are any errors those are logged . Take a look at below standard documentation .

    docs.microsoft.com/.../home-page

  • Community Member Profile Picture
    on at

    Thanks Sukrut, Sergei.

    Here maintaining success/failure log means  - I want to maintain business event log for each sales order work complete so that in future, I can trace if any business event has not triggered against a particular work complete.

    in simple words, I want to maintain business event log to trace against which SO work complete, business event triggered or not triggered.

    Please suggest some workaround on it.

  • André Arnaud de Calavon Profile Picture
    301,025 Super User 2025 Season 2 on at

    Hi Priya,

    You can't verify if it succeeded or not. You can create an additional log to insert a record in a new table, but will not tell you if the external application consuming the event did process it. E.g. the Azure event grid has no or limited retention options. Using the Azure Service Bus you are more safe. If you are using e.g. Power Automate to be triggered, then also Power Automate can fail for many reasons. You can't check the outside world.

  • Suggested answer
    Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Priya_D365,

    If the creation of BE to the sending queue fails, most likely the whole operation for sales work order complete will fail if everything is in the same transaction, but it should be in the same transaction scope. In this case, you don't need to have any kind of logs.

    BE framework itself has only an error log for BE sending operation outside D365. If sending fails, you will see an error in this log and can re-send it manually. Also, business events are using the principle "Fire and forget", so there are no other logs except error log mentioned above.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 611 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 529 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 285 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans