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 31
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:
  • CU16070246-0 Profile Picture
    CU16070246-0 on at
    Delete Comment Lines from Puchase Invoice Lines from GetReceiptLine Function
    Removing comments can make the invoice more concise slope and easy to understand, containing only important information. 
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 63,857 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,857 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

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... 287,696 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,490 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans