Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Suggested answer

how to update invoice Id in Vend Trans which is already Invoice in AX 2012 R3

Posted on by 5,885

Hi all,

We saw some invalid characters are there in Invoice Id and Description field in particular Vendor and Particular Voucher in Vendor Transaction.

0820.V1.jpg

Because of this , when user run the Vendor aging report and save the data is excel. and trying to open the excel, it's throwing error "invalid characters..."

So, they asked us to remove the invalid characters and update the invoice id like B4005

Kindly let me know how I will achieve this through script? In which tables we need to update the Invoice Id? 

Please give me more shed on this.

thanks!

 

  • Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,417 on at
    RE: how to update invoice Id in Vend Trans which is already Invoice in AX 2012 R3

    That was the first thing InvoiceId is not the primary key in the table.

  • ergun sahin Profile Picture
    ergun sahin 8,812 Super User on at
    RE: how to update invoice Id in Vend Trans which is already Invoice in AX 2012 R3

    Try at main table (vendivoicejour)

  • @rp@n Profile Picture
    @rp@n 5,885 on at
    RE: how to update invoice Id in Vend Trans which is already Invoice in AX 2012 R3

    Rename functionality is not there for this

  • Suggested answer
    ergun sahin Profile Picture
    ergun sahin 8,812 Super User on at
    RE: how to update invoice Id in Vend Trans which is already Invoice in AX 2012 R3

    I didnt tried but you can try your luck with rename function

    Or you can create Excel via code and change values at runtime

    Or you can add New field, update New field with corrected invoiceId s and use New field at the report

  • @rp@n Profile Picture
    @rp@n 5,885 on at
    RE: how to update invoice Id in Vend Trans which is already Invoice in AX 2012 R3

    Thank you Gunjan

  • Suggested answer
    Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,417 on at
    RE: how to update invoice Id in Vend Trans which is already Invoice in AX 2012 R3

    Hi Arpan,

    This thread discussed the same question. Please take a look and see if it helps you.

  • @rp@n Profile Picture
    @rp@n 5,885 on at
    RE: how to update invoice Id in Vend Trans which is already Invoice in AX 2012 R3

    Thanks Gunjan 

    But I think this is not good practice to do. Can we do reverse invoice posting instead of this ?

    Is it possible ?

    Pls give me more shed on this 

    Thanks!

  • Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,417 on at
    RE: how to update invoice Id in Vend Trans which is already Invoice in AX 2012 R3

    Hi Arpan,

    I am not sure if this is the best way to update the invoice number. Here are the tables I can see where you will need to update the invoice Id - VendInvoiceJour, VendInvoiceTrans, VendTrans. You will also need to update DocumentNumber field in GeneralJournalEntry.

    If the invoice was generated from Vendor invoice journal, you will need to update LedgerJournalTrans\Invoice field. If it was generated from Purchase orders, you could check VendInvoiceInfoTable and VendInvoiceInfoLine tables as well.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,835 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,526 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans