Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Answered

Delete Comment Lines from Puchase Invoice Lines from GetReceiptLine Function

Posted on by 20
I wanted to know if there is a way to delete all comment lines and move the actual item or other lines up.

I am using PurchRcptLine.InsertInvLineFromRcptLine(PurchaseLine); to get receipt lines into Purchase Line, but it adds comments. 
Categories:
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 63,560 Super User on at
    Delete Comment Lines from Puchase Invoice Lines from GetReceiptLine Function
    Update:
    Dynamics 365 Business Central: How to delete Comment Lines when combining receipts on a single invoice (Get Receipt Lines)
  • Verified answer
    YUN ZHU Profile Picture
    YUN ZHU 63,560 Super User on at
    Delete Comment Lines from Puchase Invoice Lines from GetReceiptLine Function
    Very interesting question, this can only be done by customization.
    For example, by default:
     
    Customize:
    Source code:
        [EventSubscriber(ObjectType::Table, Database::"Purch. Rcpt. Line", OnInsertInvLineFromRcptLineOnBeforeCheckPurchLineReceiptNo, '', false, false)]
        local procedure OnInsertInvLineFromRcptLineOnBeforeCheckPurchLineReceiptNo(var IsHandled: Boolean)
        begin
            IsHandled := true;
        end;
     
    I will discuss this question in detail on my blog next week when I have time.
     
    Thanks
    ZHU

Helpful resources

Quick Links

First Dynamics 365 Community Call (CRM Edition)

Don't miss the first D365 Community Call 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... 286,384 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,485 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans