Would it be possible to create a BPM to prevent duplicate invoices from posting? The system is designed to allow duplicate invoices (by adding an extra ‘0’ to the duplicate invoice) to post and I’m looking to create a BPM to alert the user that a duplicate invoice with the same amount, supplier and invoice number exists. Which specified condition would be best to do something like this in a Pre-Processing method directive?
Why are they adding a 0 to the invoice number?
The system does not allow you enter a duplicate invoice from a supplier.
Sounds like a process problem.
Cathy - I see two process problems
- Accuracy of data entry (lets hope they don’t add a zero to the invoice amt!)
- Why an invoice would be queued to be entered a second time (maybe they get multiple copies. A paper copy via snail mail, and another via email)
I agree with @Cathy and @ckrusen in that you’ll likely want to re-evaluate this process. That said, it should be possible to create your own validation in a BPM. One possible way to go about this which should not crush system performance would be to create a custom field that trims preceding zeroes and stores the result in a custom short character field. Then, in a pre-processing directive of the PrePostGroupInvoices method, you could compare the custom character field in your invoice batch against those that are posted in the system. If there is a match, mark InvoiceHeld. Otherwise, you could do a comparison query with your zero-trimming function, but this could become a rather pricey query.
We are multi-company with a central pay company that handles all our invoice payments centrally. What happens is that child company posts an invoice to the central pay parent company and then the central pay company receives the same invoice to post again directly in the central pay company. When the child company posts the duplicate invoice to the central pay company, the system by designed allows the system to automatically add a ‘0’ to the duplicate invoice in order to post it during the Sonic multi-company process.
The system doesn’t allow duplicate invoices if it is a single company but for multi-company with a central pay, the system adds a ‘0’ (essentially making that invoice a non-duplicate but still a duplicate…) which we would like a BPM to alert before they post it.
I see. Instead of holding the invoice, you could call my previously suggested logic in a form customization when the toolclick is triggered, providing a warning messagebox and allowing the user to either cancel out or continue with the post.