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, ...
Answered

Business event success and error status

(0) ShareShare
ReportReport
Posted on by

Hi experts,

Good morning and good evening.

I am working on Business event and needs your help.

1. Just wanted to check - how I 'll check, Is business event successfully trigger or not? and based on successful trigger of business event I want to perform another operation

Example 

businessEvent           = XXXBusinessEvent::newFromInventTrans(inventTable);

if(businessEvent)
{
   businessEvent.send();

// TODO

 Check if business event success then insert record into log table

}

2. In business event error log - I can see below log but when I've checked in Azure grid/ receiving application; I found receiving application, received the business event JSON response.

just wanted to know - If receiving application received the business event JSON successfully than why respected business event captured into business event error log ?

3. If I clicked on resend - than my above code would again trigger or not?

pastedimage1588952833037v1.png

Thanks.

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    300,915 Super User 2025 Season 2 on at

    Hi Priya,

    Is this the same question as you asked about a week ago? community.dynamics.com/.../maintaining-business-event-log

  • Community Member Profile Picture
    on at

    Thanks André.

    I have gone through your suggestion and developed custom table to record success business event.

    But I have below challenges. It would be a great help if you provide some light on below points:

    1. Just wanted to check -  how  we can implement : on successful trigger of business event I wanted to perform another operation

    Example

    businessEvent           = XXXBusinessEvent::newFromInventTrans(inventTable);

    if(businessEvent)

    {

      businessEvent.send();

    // TODO

    Check if business event success then insert record into log table

    }

    2. In business event error log - I can see below log but when I've checked in Azure grid/ receiving application; I found receiving application, received the business event JSON response.

    just wanted to know - If receiving application received the business event JSON successfully than why respected business event captured into business event error log ?

    3. If I clicked on resend - than my above code would again trigger or not?

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

    I don't think there is any way to check if business event a success or not. Once it is triggered and sent to external application , its done. You can explore the possibility of checking, if there is any error exist in error log table.  If there is no error then insert it as a success(assuming its a success)

    You have to  debug and see how records gets inserted in log table and investigate why record is created in error log although you see JSON response in your receiving application. Do you see the record as soon as event fires ?

    Resend should trigger the event again whenever you want to send it again.

  • Verified answer
    Madhuri Ailavarapu Profile Picture
    on at

    Hi Priya,

    You can check BusinessEventCommitLog table to confirm if the events are delivered to external system . There will be records in businessEventCommitLog only for few seconds before they were delivered to external system

  • Community Member Profile Picture
    on at

    Thanks Sukrut and Madhavi.

    I need one more help - As I mentioned, business event successfully triggered from D365 and external application received the event response as well but in Event log- I can see error log .

    Can you please provide some workaround on it [I will need to add try/catch block while sending business event (If yes, then what would be the code sample)] ?

    Exception: System.Net.Http.HttpRequestException

    pastedimage1588991462950v1.png

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 664 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 303 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans