Journal Type in vendtrans.insert


The insert routine in vendtrans makes a call to my own method to print a barcode. Currently, this is unconditional, but I need it to only happen when the JournalType is “Invoice Register” . In the method, this.journalNum always seems to be empty, so I cant find the JournalType. Can anyone help.

Hi Pete,

I am not sure about what process you are trying to achieve. But try to analyze where the JournalNum field gets populated and try to call your method after this.

Perhaps if you could explain the business process and AX version, we could be of more help.

Thanks for your answer.

We produce scanning software that stores images of incoming purchase invoices. When a user receives a document, he will register it in AX, print a barcode label that has the invoice number on it, stick this on the paper and then scan it. The scanning software reads the barcode and looks up data associated with that invoice - supplier name, amounts etc. This information togethanser with the images is entered into our database.

I wrote a method that printed a barcode. The idea was that every time a user creates an invoice, a barcode pops out automatically, so a call to this method was added to vendtrans.insert method.

However, this user only wants a barcode to be printed some of the time. it depends on what is in the journal type.

Does that make sense ?