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