web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Prevent Users From Deleting Payables Transactions GP 10

(0) ShareShare
ReportReport
Posted on by 7,365

I am trying to figure out how to get around the deleting of payables transactions when they "make a change" to it.  It causes confusion for users when they are presented with a Message Box with Save, Delete, Cancel.  I understand that if you really think about it, it makes sense, but not to some users.  Like when you make changes to a Vendor Card, at least you get presented with "Discard" instead of "Delete"

So I am trying to figure out how to prevent this.  I am going to Field Level Security the Delete Buttons on the Payables Batch window and the Transaction Window, but what could still prevent them from deleting when they scroll through transactions and GP registers a change?  I even thought about making some sort of trigger for the DocPrinted field and disallowing the Delete Unposted Printed Documents option, but then nobody can delete them at all.  I want a user or Class to be able to delete.

The issue is really from a Third Party integrated batch that absolutely needs to be posted in full.  A few times someone has accidentally deleted a transaction in the batch before it is posted.

Any thoughts?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    L Vail Profile Picture
    65,271 on at

    You could use VBA to trap the modal dialog before the user sees it and answer it yourself. Using VBA again you can change the text of the dialog to something more understandable. Because the window contains a scrolling window, Discard will never be an option. I think the modal dialog trap may work for you.

    Let us know,

    Kind regards,

    Leslie

  • veeyeskay Profile Picture
    on at

    Leslie is right.

    Let us know if you need further assistance.

  • K Day Profile Picture
    7,365 on at

    I am pretty familiar with vba but have never tried to intercept a modal dialogue before.  Do you have a quick line of code or a hint that will allow me to get that?  Are you saying that I can change the labels on the buttons?  Like renaming the Delete button to "DELETE TRANSACTION" or something like that?  Or change the caption to say "Pressing Delete will Delete the Transaction."  If I am working with the box, can I just inactivate the "Delete" button from the 3 of them?

    I like the idea, but I am trying to thing of how it might impact regular AP Processing.  Besides me not wanting to let them delete, I'm not sure that I am fond or answering that button for them at all times.  Ideally, they would get "OK" and "Cancel" and not see or have the Delete Option Disabled.

  • veeyeskay Profile Picture
    on at

    Hello

    You can take a look at this article in my blog which has a sample.

    msdynamicstips.com/.../handling-modal-dialogs-in-microsoft-dynamics-gp

    Let us know if you need further assistance.

  • K Day Profile Picture
    7,365 on at

    Thanks everyone.  Sounds like I've got some work to do.

  • veeyeskay Profile Picture
    on at

    Hello K Day

    Thanks for the update. Let us know if you need further assistance.

  • K Day Profile Picture
    7,365 on at

    I finally got around to this and it works nicely, thanks!  I found only one strange behavior.  I want to use this on the Payables Transaction window and it works well.  I found two places where I can trigger it to fire.  Make a change to a Payables Transaction and click one of the "Next Transaction" buttons at the bottom, or to hit the lookup and try to select another voucher.  In both events, I am able to intercept and answer the same dialogue box.

    However, in the Sales Transaction Screen, it works nicely for the "Next Transaction" button, but it doesn't seem to work when I hit the lookup and try to select another Order.  I still get prompted with the same Message that I am trying to intercept, (Save, Delete, Cancel) but it doesn't answer it for me.  I'll look a little closer; maybe the spelling of the Prompt string is a little different, but it seems like the same message I am trying to intercept, I was wondering why that might be.  Any suggestions?

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans