web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Reversing a posted sales credit memo in Business central

(0) ShareShare
ReportReport
Posted on by

Is there any way  for reversing the sales credit memo in Business central

Posted a credit memo with different date, i.e  last month date in place of current  month date , Now  I want to Reverse a posted sales credit memo. 

I have the same question (0)
  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,105 Moderator on at
    RE: Reversing a posted sales credit memo in Business central

    There is a cancel option in the upper left corner, that will reverse the credit memo.

    Please see screenshot

    pastedimage1659354333587v1.png

  • Suggested answer
    Vaishnavi J Profile Picture
    3,062 on at
    RE: Reversing a posted sales credit memo in Business central

    Hi  

    If you had created Posted Sales credit memo using the action Correct or Cancel in PSI then you can see the Cancel action only.

    or else you need to create a processing report or codeunit which takes the posting date and document no and fetches it all the ledger entries and update the posting date.

    if it is only one document then check its ledger entries which is affected using Find Entries action and get the ledger and sub ledger table and then hardcode the document no in your code and update only those table which is affected. This is risky process but make sure you perform in Sandbox before deploying it into production. You can follow the below logic but add only those tables which is affected by your document.

    codeunit 50123 MyCodeunit
    {
        Permissions = tabledata "Cust. Ledger Entry" = RIMD, tabledata "Sales Cr.Memo Header" = RIMD, tabledata "Detailed Cust. Ledg. Entry" = RIMD, tabledata "Item Ledger Entry" = RIMD;
        trigger OnRun()
        var
            Rec_CLE: Record "Cust. Ledger Entry";
            REC_PSCM: Record "Sales Cr.Memo Header";
            Rec_ILE: Record "Item Ledger Entry";
            Rec_VLE: Record "Value Entry";
            Rec_TE: Record "VAT Entry";
            Rec_DCLE: Record "Detailed Cust. Ledg. Entry";


        begin
            REC_PSCM.SetRange("No.", 'PS-CR104003');
            if REC_PSCM.FindFirst() then begin
                REC_PSCM."Posting Date" := 20180612D; // The date format must be yyyymmdd
                REC_PSCM.Modify(true);
                Rec_CLE.Reset();
                Rec_CLE.SetRange("Document No.", REC_PSCM."No.");
                if Rec_CLE.FindFirst() then begin
                    Rec_CLE."Posting Date" := REC_PSCM."Posting Date";
                    Rec_CLE.Modify(true);
                    Rec_DCLE.SetRange("Document No.", REC_PSCM."No.");
                    if Rec_DCLE.FindFirst() then begin
                        Rec_DCLE."Posting Date" := REC_PSCM."Posting Date";
                        Rec_DCLE.Modify(true);
                    end;
                    Rec_ILE.SetRange("Document No.", REC_PSCM."No.");
                    if Rec_ILE.FindFirst() then begin
                        Rec_ILE."Posting Date" := REC_PSCM."Posting Date";
                        Rec_ILE.Modify(true);
                    end;
                    Rec_VLE.SetRange("Document No.", REC_PSCM."No.");
                    if Rec_VLE.FindFirst() then begin
                        Rec_VLE."Posting Date" := REC_PSCM."Posting Date";
                        Rec_VLE.Modify(true);
                    end;


                end;

            end;
        end;


    }

    If my answer was helpful to you, please verify it so that other users know it worked. Thank you very much

  • ManishS Profile Picture
    86 on at
    RE: Reversing a posted sales credit memo in Business central

    Sales Credit Memo is having Type as Item or GL Account.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,377

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,696 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,512 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans