You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We discovered a transaction issue when we try to print a service quote from page 5964 "Service Quote". We also noticed this problem in Page 5900 "Service Order".
We added a custom field of BLOB type. When this field is filled in and then we press on "Print button", we have this error :
We had to create our own custom button and make the standard one invisible temporarily.
You can check in the "Expected behavior" section for a suggested solution.
Thanks in advance for your help.
Expected behavior
Here is the current part of code for the "Print" action :
action("&Print")
{
ApplicationArea = Service;
Caption = '&Print';
Ellipsis = true;
Image = Print;
ToolTip = 'Prepare to print the document. A report request window for the document opens where you can specify what to include on the print-out.';
trigger OnAction()
var
ServDocumentPrint: Codeunit "Serv. Document Print";
begin
CurrPage.Update(true);
ServDocumentPrint.PrintServiceHeader(Rec);
end;
}
The solution we suggest is to add a commit statement after the "CurrPage.Update(true) to close the transaction.
action("&Print")
{
ApplicationArea = Service;
Caption = '&Print';
Ellipsis = true;
Image = Print;
ToolTip = 'Prepare to print the document. A report request window for the document opens where you can specify what to include on the print-out.';
trigger OnAction()
var
ServDocumentPrint: Codeunit "Serv. Document Print";
begin
CurrPage.Update(true);
Commit;
ServDocumentPrint.PrintServiceHeader(Rec);
end;
}
Steps to reproduce
Add a variable in Page 5964 "Service Quote"
var
WorkDescription: Text;
Add a new field in layout section on the same page
field("WorkDescription NSI"; WorkDescription)
{
ApplicationArea = Basic, Suite;
MultiLine = true;
ShowCaption = false;
ToolTip = 'Specifies the products or service being offered';
trigger OnValidate()
begin
SetWorkDescription(WorkDescription);
end;
}
Write this procedure an call it in Validate trigger
procedure SetWorkDescription(NewWorkDescription: Text)
var
OutStream: OutStream;
begin
Clear("Work Description");
"Work Description".CreateOutStream(OutStream, TEXTENCODING::UTF8);
OutStream.WriteText(NewWorkDescription);
Modify();
end;
Go to a Service Quote Card Page, enter a value in the Work Description Field and try press Print Button
Additional context
No response
I will provide a fix for a bug
I will provide a fix for a bug
Internal work item: AB#563991
The text was updated successfully, but these errors were encountered:
Why won't you add Commit() in your WorkDescription control OnValidate?
field("WorkDescription NSI"; WorkDescription)
{
ApplicationArea = Basic, Suite;
MultiLine = true;
ShowCaption = false;
ToolTip = 'Specifies the products or service being offered';
trigger OnValidate()
begin
SetWorkDescription(WorkDescription);
Commit(); //required for the next Print action call
end;
}
Describe the issue
Hello Team,
We discovered a transaction issue when we try to print a service quote from page 5964 "Service Quote". We also noticed this problem in Page 5900 "Service Order".
We added a custom field of BLOB type. When this field is filled in and then we press on "Print button", we have this error :
We had to create our own custom button and make the standard one invisible temporarily.
You can check in the "Expected behavior" section for a suggested solution.
Thanks in advance for your help.
Expected behavior
Here is the current part of code for the "Print" action :
The solution we suggest is to add a commit statement after the "CurrPage.Update(true) to close the transaction.
Steps to reproduce
Additional context
No response
I will provide a fix for a bug
Internal work item: AB#563991
The text was updated successfully, but these errors were encountered: