by Steve Endow
Why does this dialog appear by default after EVERY document posting in Business Central?
This is an annoying dialog |
I was recently on a call with my colleague Tanya Henderson to review some accounts payable payment processes in Business Central.
After I posted a purchasing invoice, she told me to click No on this useless dialog, saying that she has to train all of her customers to click no, and she wished she could get rid of it.
Can this dialog be turned off? If not, can a PTE suppress it after posting?
Challenge accepted!
I don't know anything about that dialog or how it works, so I started my research by looking at the BC code to look for clues.
Since I always have a local copy of the BC Code History repository by Stefan Maron, I opened File Explorer and navigated to BaseApp -> Source -> Base Application and found the PurchaseInvoice.Page.al file.
Purchase Invoice Page Located |
I opened that AL file in VS Code and searched for "the invoice is posted". And there we see the message defined as a Label variable.
A Clue |
I then searched for OpenPostedPurchaseInvQst. What do we have here?
So it's optional? |
That appears to be a procedure that looks like the dialog is optional. "if InstructionMgt.ShowConfirm()" seems to imply it's checking something to see if it should display the confirmation dialog.
But what is InstructionMgt? I don't know. Back to Stefan's BC Code History repo!
Getting warmer... |
The InstructionMgt codeunit was more difficult to interpret--I didn't understand exactly what it was doing, or how it was doing it. But as I scrolled through the Codeunit.al file, I noticed some clues.
UserPreference Record |
I saw these procedures that referenced a UserPreference record. That sounds promising.
But I am still pretty new to Business Central, so I didn't know what "User Preferences" are, or where they are.
I knew about the "My Settings" menu, so that's where I started to search.
Start with My Settings |
Well, nothing obvious, but what is this "Notifications" option?
Notifications? |
Whoa. That's quite a list. But the names of the notifications look promising.
Lots Of Notifications |
Let's try to search for "posting"...
Steve Endow is a Microsoft MVP in Los Angeles. He works with Dynamics 365 Business Central and related technologies.
You can also find him on Twitter and YouTube, or through these links: links.steveendow.com
No comments:
Post a Comment
All comments must be reviewed and approved before being published. Your comment will not appear immediately.