Skip to main content

Notifications

Microsoft Dynamics AX forum
Answered

Adding a custom field to VendTrans through Post on Pending Invoices

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

  • 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,274 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,274 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,274 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,274 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.

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Dynamics 365 Community Newsletter - August 2024

Catch up on the latest D365 Community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,186 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 227,996 Super User 2024 Season 2

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans