Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

External Business Event not working

Posted on by 288
Hi all.
I created a very simple external business event and I can't manage to make it work.
The code is like this one:
 
enumextension 60100 JJMcEventCategoryExt extends EventCategory
{
    value(60100; JJMcInsert) { }
    value(60101; JJMcModify) { }
    value(60102; JJMcDelete) { }
}
codeunit 60100 JJMcExternalBusinessEvents
{
    procedure onAfterModifyCustomers(systemId: Guid; no: Code[20]; name: Text[250])
    begin
        onAfterModifyCustomer(SystemId, no, name);
    end;
 
    [ExternalBusinessEvent('OnAfterModifyCustomer', 'Descripción breve', 'Descripción ampliada', EventCategory::JJMcModify, '1.0')]
    local procedure onAfterModifyCustomer(systemId: Guid; no: Code[20]; name: Text[250])
    begin
    end;
}
tableextension 60100 JJMcCustomerExt extends Customer
{
    trigger OnAfterModify()
    var
        JJMcExternalBusinessEvents: Codeunit JJMcExternalBusinessEvents;
    begin
        JJMcExternalBusinessEvents.onAfterModifyCustomers(Rec.SystemId, Rec./No./, Rec.Name);
    end;
}
 
 
I verified all the different configurations on my instance regarding to External bussines events, and all of then are, apparently, ok:
 
PS C://WINDOWS//system32> Get-NAVServerConfiguration -ServerInstance BCDEMO -KeyName ExternalEventsEnabledServiceLevel
true
PS C://WINDOWS//system32> Get-NAVServerConfiguration -ServerInstance BCDEMO -KeyName ExternalEventsEnabledEnvironmentLevel
true
PS C://WINDOWS//system32> Get-NAVServerConfiguration -ServerInstance BCDEMO -KeyName ExternalEventsActivityLogRetentionDays
7
PS C://WINDOWS//system32> Get-NAVServerConfiguration -ServerInstance BCDEMO -KeyName ExternalEventsActivityLogCleanupBatchSize
50000
 
Am I missing anything to make it work?
 
Thank you ever so much in avdance.
Categories:
  • Suggested answer
    JJMc Profile Picture
    JJMc 288 on at
    External Business Event not working
    Thank you Inge for your anwer.
     
    Looking your suggestion I realized that the problem was not in my code. The problem was in the suscription to the external event.
    Althoug when you subscribe to one External Business Event, if this subscription is not ok, I missed one parameter, it tells you that the subscription was created successfuly, but it was not.
    I found the parameter missing and now it works.
     
    Thank you ever so much for your time.
     
    Kind regards
  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,748 Super User 2024 Season 1 on at
    External Business Event not working
    Have you followed all the instructions in this documentation including the integration to Dataverse?
     

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans