Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / Adding BatchJob parame...
Finance forum
Unanswered

Adding BatchJob parameters details in Business event mail notifications when Batchjob fails

Posted on by 3
Hello Everyone,
 

I have one requirement: when batch job fails, I have to send batch job parameter data in business events mail notifications.

By extending the contract class, I added a parameter field BatchJobFailedBusinessEvent  payload schema, but Parameter filed is a container type field; this type is not supported in the business events.
Can you please suggest how I could fulfill my requirement?

 

Thanks,

  • CU25070349-0 Profile Picture
    CU25070349-0 3 on at
    Adding BatchJob parameters details in Business event mail notifications when Batchjob fails
     
    Hi Martin, 
    Thank You for  Response.
     
    I want to put the infoLog and parameters of batch jobs in JSON. But those are containers and inserted in batch history after batch jobs end.
     
    When I am adding an extension to intialize() of the BatchJobFailedBusinessEvent class, this class has a batchjob table as a parameter. This i snot working because this  class execution time batch job not ending.
    Please let me know the trigger point to get batch job history data to add in JSON.
     
    Thanks,
     
     
  • Martin Dráb Profile Picture
    Martin Dráb 225,864 Super User on at
    Adding BatchJob parameters details in Business event mail notifications when Batchjob fails
    It's up to you to decide how you want/need to get the data. Some values, e.g. a primitive type value or a packed contract class, can be put to JSON quite easily. But what if the parameter is a packed QueryRun object, for example? What do you expect to get in your business event payload?
     
    (Moved from D365 general forum.)

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,584 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,864 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans