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

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Business event error log

(0) ShareShare
ReportReport
Posted on by

Hello experts,

Good morning.

I tried to explored business events but I have few points, for that I needs your guidance :

1. I have written below code to trigger business event, just wanted to check - do we need to write try/catch block to handle exception or standard business event framework would handle (inventBusinessEvent.send() )

Example

inventBusinessEvent           = XXXBusinessEvent::newFromInventTrans(inventTable);

if(inventBusinessEvent           )

{

  inventBusinessEvent.send();

}

2.  if my understanding is correct, If any exception made, than exception would be logged into business event error log 

Please advice.

3. For the unit testing, what are the possible ways to made business event error out so that I could check, for business event failure any log maintain in business event log or not? 

4. we have any job to resend business event log ?

Many thanks in advance.

Regards | Priya

I have the same question (0)
  • Rocky Ga Profile Picture
    20 on at
    RE: Business event error log

    Thanks Sergei Minozhenko

    Found that Batch Job Service was not running on the box.

  • Sergei Minozhenko Profile Picture
    23,093 on at
    RE: Business event error log

    Hi Rocky Ga,

    Do you see if batch job "Business events batch processor" is running normally in the batch job list form and recurrence is frequent enough? If you open batch job history for this batch job, do you see any errors?

  • Rocky Ga Profile Picture
    20 on at
    RE: Business event error log

     Sergei Minozhenko Thanks.

    See attached. I turned the Business event batch processing but records are still staying in the BUSINESSEVENTSCOMMITLOG table and not sent to the Logic App / Workflow.Screen-Shot-2021_2D00_10_2D00_13-at-8.49.34-AM.png

    Screen-Shot-2021_2D00_10_2D00_13-at-8.49.49-AM.png

  • Sergei Minozhenko Profile Picture
    23,093 on at
    RE: Business event error log

    Hi Rocky Ga,

    I recommend checking

    1. The status of the "Business events batch processor" batch job and it's history (maybe there are some issues in the log)

    2. Check "Business event parameters" (System administration - Setup - Business event - Business event parameters) if the batch job option is activated

  • Rocky Ga Profile Picture
    20 on at
    RE: Business event error log

    Hi Sergei Minozhenko  - My events are being triggered and sending an entry to the Commit Log Table. But seems like it is stuck there. Do you know what will cause them to stay in Commit log table and not move?

  • Community Member Profile Picture
    on at
    RE: Business event error log

    Hi Rahul,

    I have written code because I wanted to execute business event onto the particular D365 event (example : whenever we are doing purchase purchase receipt etc.)

    Reagrds

    Priya.

  • Verified answer
    Sergei Minozhenko Profile Picture
    23,093 on at
    RE: Business event error log

    Hi Priya_D365,

    1. "Send" method don't send anything yet. Is just creates a message into the commit log table. Separate operation sends events from this log outside and deletes records if the event was sent successfully.

    2. If send operation fails the operation which triggers event will fail accordingly (depends on how DB transaction is made and error handling) and it will not be moved to the business event error log. The business event error log is used when the event can't be sent outside D365.

    4. You can re-send an event manually from the business event error log and there are no other re-send operations. Also in "Business event parameter" you can set up a number of automatic retries (i think by default it's 3 attempts).

  • Suggested answer
    Rahul Mohta Profile Picture
    21,032 on at
    RE: Business event error log

    why are you writing code to trigger business events, could directly schedule batch job to do it

    refer PU34

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,339

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 600 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans