Skip to Content
Former Member
Jun 22, 2007 at 06:45 AM

DIEventService on InvoiceAddition..


Hi All,

I am using DIEventService to execute a storedprocedure whenever an ARInvoice added to B1.For this I wrote an event handler .This works fine when we add Invoice through B1 Invoce form or by adding invoice through code.But it does not work when we create invoices through Document Generation wizard.Why this event handler doesnt work when executing DGWizard? I tried the DIServiceClient sample also, but the same result again.AnyOne have any idea why this happens?

Code is as follows..

evtService.AddListener( _

SAPbobsCOM.BoObjectTypes.oInvoices.ToString(), _

B1DIEventsService.B1DIEventsTransactionTypes.Add.ToString(), _

New B1DIEventsService.B1DIEventsListenerDelegate(AddressOf CreateInvoiceEventHandler))

CreateInvoiceEventHandler is a function in which we executes the storedprocedure..

Anybody have an idea on which event i have to add listener on which i can catch the invoice addition on execution of document generation wizard.?

Plz help,