Posted transaction can not be directly modified. Even harmless fields like Description as well directly. But this is not impossible can be done a bit differently.
I tried to create an extension for you to help you out on this. Below video shows the steps
[View:/cfs-file/__key/communityserver-discussions-components-files/758/UpdateDescription-V1.mp4:320:240]
For the App, I have created a new page and extended the Posted Sales Invoice Subform Page. Here is the code for the same:
{
PageType = Card;
ApplicationArea = All;
UsageCategory = Administration;
Permissions = tabledata 113 = rmid;
Caption = 'Update Invoice Line Description';
layout
{
area(Content)
{
group("Current Info")
{
Editable = false;
field(InvoiceNo; InvoiceNo)
{
ApplicationArea = All;
Caption = 'Sales Invoice No.';
}
field(LineNo; LineNo)
{
ApplicationArea = All;
Caption = 'Line No.';
}
field(Description; Description)
{
ApplicationArea = All;
}
}
group("Updated Info")
{
field(NewDescription; NewDescription)
{
ApplicationArea = All;
}
}
}
}
Procedure SetSINVInfo(SINVNo: Code[20]; SINVLineNo: integer)
begin
InvoiceNo := SINVNo;
LineNo := SINVLineNo;
end;
trigger OnOpenPage()
begin
SalesInvoiceLine.get(InvoiceNo, LineNo);
Description := SalesInvoiceLine.Description;
NewDescription := Description;
end;
trigger OnQueryClosePage(CloseAction: Action): Boolean
begin
if CloseAction = CloseAction::LookupOK then begin
IF NewDescription <> '' then
SalesInvoiceLine.Description := NewDescription;
SalesInvoiceLine.Modify(true);
end;
end;
var
SalesInvoiceLine: Record "Sales Invoice Line";
Description, NewDescription : text[100];
InvoiceNo: Code[20];
LineNo: Integer;
}
2. SalesInvoiceSub.PageExt.al
pageextension 50000 SalesInvoiceSub extends "Posted Sales Invoice Subform"
{
actions
{
// Add changes to page actions here
addlast("&Line")
{
action("Update Description")
{
ApplicationArea = All;
Image = UpdateDescription;
Promoted = true;
PromotedCategory = Process;
trigger OnAction()
var
UpdatePage: Page UpdateInvInfo;
begin
UpdatePage.SetSINVInfo(Rec."Document No.", Rec."Line No.");
UpdatePage.LookupMode(true);
UpdatePage.RunModal();
end;
}
}
}
}
Hope tis Helps. You can further extend it as per your requirement. A word of caution: don't try modifying the important fields from the invoice