Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Adding a custom field to VendTrans through Post on Pending Invoices

(0) ShareShare
ReportReport
Posted on by 50

Hi, 

I have added a custom date field to the Vendor Invoice which is located on the VendInvoiceInfoTable and I need it to show on VendTrans or VendTransOpen table once the vendor invoice has been posted. Does anyone know how to do this? I was thinking of using a data method or adding it to a map? TIA

*This post is locked for comments

  • chicagoax Profile Picture
    chicagoax 50 on at
    RE: Adding a custom field to VendTrans through Post on Pending Invoices

    So this is what is crashing. I'll keep doing some more research but so far commenting this line out works otherwise the aos crashes during post

    [quote user="ievgen Miroshnikov"]

    It should be 

    this.parmVGRWeBelieve(_vendTrans.VGRWeBelieve);


    and put it before super()

    [/quote]

  • chicagoax Profile Picture
    chicagoax 50 on at
    RE: Adding a custom field to VendTrans through Post on Pending Invoices

    will do. Thanks again

  • Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: Adding a custom field to VendTrans through Post on Pending Invoices

    Hi chicagoax,

    I don't think so. Please do full compile and full CIL. If it won't help use blogs.msdn.microsoft.com/.../crash-and-hang-analysis-on-lcs to check if it's a kernel bug. And of course you can revert changes to be 100% sure.

  • chicagoax Profile Picture
    chicagoax 50 on at
    RE: Adding a custom field to VendTrans through Post on Pending Invoices

    hey ievgen,

    The post and transfer process is failing for me on the payment Journal. Would this newly added field have anything to do with it? The AOS crashes without giving any error. Thanks

  • chicagoax Profile Picture
    chicagoax 50 on at
    RE: Adding a custom field to VendTrans through Post on Pending Invoices

    Thanks! That worked. I knew I was close

  • Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: Adding a custom field to VendTrans through Post on Pending Invoices

    It should be 

    this.parmVGRWeBelieve(_vendTrans.VGRWeBelieve);


    and put it before super()

  • chicagoax Profile Picture
    chicagoax 50 on at
    RE: Adding a custom field to VendTrans through Post on Pending Invoices

    here's the code so far in VendVoucher class

    public VGRWeBelieve parmVGRWeBelieve(VGRWeBelieve _vgrWeBelieve = vgrWeBelieve)

    {

    vgrWeBelieve = _vgrWeBelieve;

    return vgrWeBelieve;

    }

    initCustVendTrans method -

    If(custVendTrans.TableId == tableNum(VendTrans))

    {

    custVendTrans.VGRWeBelieve = vgrWeBelieve;

    }

    and lastly

    the post method has this code

    vendVoucher.parmVGRWeBelieve(_vendTrans.VGRWeBelieve)

    I think post is where I am going wrong as vendVoucher doesn't exist

  • Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: Adding a custom field to VendTrans through Post on Pending Invoices

    Hi chicagoax,

    Let's do it another way, tell us what changes do you have and we will try to say what is wrong.

  • chicagoax Profile Picture
    chicagoax 50 on at
    RE: Adding a custom field to VendTrans through Post on Pending Invoices

    Hey ievegen,

    Sorry for the late reply. Just got around to testing this and it's not working. Can you tell me what the code for the post() method on vendvoucher will look like if I am using the new parm route? thanks

  • Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: Adding a custom field to VendTrans through Post on Pending Invoices

    CustVendVoucher holds logic that is applicable to both customer and vendor posting, VendVoucher  only vendor specific. If you not going to do similar change for Sales invoice you can leave it in VendVoucher.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey Pt 2

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,904 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,605 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans