Skip to main content
Business Central forum
Suggested answer

Purchase Line extension + Posting

editSubscribe (1) ShareShare
ReportReport
Posted on by
Dear All,
I have extended purchase line table and added a field that is compulsory. I want if I post my purchase invoice or order, the field will reflect in table Purch. Inv. Line i.e. Posted purchase invoice in the lines and if possible (and no a must) it should hit General ledger the debit account. What should I do? any Idea?
Attachments
  • tanya07 Profile Picture
    tanya07 1,523 on at
    Purchase Line extension + Posting
    Hi ,
     
    the new field seems a amount value field where you wish to reflect to the GL acc being hit as a debit amount , am I right ?
     
    BR,
    Tanya
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 60,087 Super User on at
    Purchase Line extension + Posting
    Hi, hope the following helps.
    Dynamics 365 Business Central: How to flow/pass custom field values
     
    Thanks.
    ZHU
  • RomRyan Profile Picture
    RomRyan on at
    Purchase Line extension + Posting
    Which objectType, the object it's self and event should I subscribe to make sure my customized field in purchase line is updated/inserted to Purch. Inv. Line?  I have tried severally but it's not responding during posting of purchase invoice.
  • Suggested answer
    TeddyH Profile Picture
    TeddyH 12,731 Super User on at
    Purchase Line extension + Posting
    As long as the field no is the same between the Purchase Line and Purch. Inv. Line table, it will get transferred automatically during posting.
    To hit General Ledger, it will be more difficult because you need to transfer it to General Journal Line and then General Ledger Entry.
  • RomRyan Profile Picture
    RomRyan on at
    Purchase Line extension + Posting
    is the below correct?
     
    [EventSubscriber(ObjectType::Table, Database::"Purch. Inv. Line" , 'OnBeforeInsertEvent', '', true, true)]
  • Suggested answer
    gdrenteria Profile Picture
    gdrenteria 2,788 Super User on at
    Purchase Line extension + Posting
    Hi
    Here some information, i hope this can help you and give you some hints
    Best regards
    Gerardo
  • Ariba Mehdi Profile Picture
    Ariba Mehdi 142 on at
    Purchase Line extension + Posting
    Hi there,

    Assign the same field ID to your custom field in both tables. Hopefully, it will reflect the values in Posted purchase lines after posting.  
     
     
    Hope it helps!

Helpful resources

Quick Links

New Blog Features Released!

Check out the new community blog features for viewers and authors…

Setting Up Knowledge Sources for Copilot…

Look at how configuring a comprehensive knowledge base is crucial…

Demystifying Copilot with Georg Glantschnig…

Industry experts answer burning questions directly from our amazing Community…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,130 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 222,689 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,138

Featured topics

Product updates

Dynamics 365 release plans