How to grab data from last Posted Invoice of a customer?

yuppicideyuppicide Member Posts: 410
edited 2015-03-16 in Navision Attain
On customer card, is it possible to take data from a customers last Posted Invoice and display? I might be able to figure out how to get data myself, but how to only grab last invoice?

If you go to Posted Invoice on the Invoice tab there's the following fields: "Payment Method Code", "Credit Card No.", and "Expire Date".

This way when I talk to a customer I can quickly open their card, say "Shall I use the Visa card on file ending in #### expires ##/##?"

Comments

  • kinekine Member Posts: 12,562
    What mean "Last Invoice" for you? Invoice with latest Posting Date? Invoice posted as last, even when it is with older Posting Date than another Invoice? Invoice with highest No.? ;-)

    If it is "Last posted Posted invoice", than one way is to add process to Posting codeunit which will write these data for you where you want. But, of course, if it will write them into the Customer table, it means you will lock the table during the posting. Or you can just create function "GetLastPostedInvoice" on the Customer table which will take the invoice for you and you just display needed fields on the Customer Card form... Or you can do that on some button to get the info only when needed, thus not slowing the process by searching for the invoice when not needed...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • SavatageSavatage Member Posts: 7,142
    Why not just add some new fields to the customer card for credit card number and exp date?
    Or add the info in the customers comments?
  • yuppicideyuppicide Member Posts: 410
    Well, I have already created a separate tab on the customer card with fields on it.. I manually update the data at the end of the month. Just last 4 of CC, expiration, and card type.

    Problem with that is not that I have to do the work. The problem is that:

    - Data entry error could occur.

    - Someone can call say March 16th.. we'll say the card we have on file is 1234, but since it's not updated until the end of the month what if there was a different card processed in the mean time and didn't get entered in the system yet.

    I don't mind if there's a button that takes a second or two to extract the data.. similar to when you hit Ledger Entries button and they take a few seconds to pop up.
  • SavatageSavatage Member Posts: 7,142
    Since I know you can't do any code the only way would be to click on the balance go to the last invoice entry & navigate to the invoice.
Sign In or Register to comment.