Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

Purchase Line extension + Posting

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?
  • tanya07 Profile Picture
    tanya07 1,535 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 64,622 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,775 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 5,353 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 154 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

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... 288,768 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,985 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans