Hi Amit,
PO line description also length issue...
the default BASE code is
field(11; Description; Text[100])
{
Caption = 'Description';
TableRelation = IF (Type = CONST("G/L Account"), "No." = CONST(''),"System-Created Entry" = CONST(false)) "G/L Account".Name WHERE("Direct Posting" = CONST(true), "Account Type" = CONST(Posting), Blocked = CONST(false))
ELSE
IF (Type = CONST("G/L Account"), "System-Created Entry" = CONST(true)) "G/L Account".Name
ELSE
IF (Type = CONST(Item), "Document Type" = FILTER(<> "Credit Memo" & <> "Return Order")) Item.Description WHERE(Blocked = CONST(false), "Purchasing Blocked" = CONST(false))
ELSE
IF (Type = CONST(Item), "Document Type" = FILTER("Credit Memo" | "Return Order")) Item.Description WHERE(Blocked = CONST(false))
ELSE
IF (Type = CONST("Fixed Asset")) "Fixed Asset".Description
ELSE
IF (Type = CONST("Charge (Item)")) "Item Charge".Description
else
if (Type = CONST(Resource)) Resource.Name;
ValidateTableRelation = false;
trigger OnValidate()
var
ApplicationAreaMgmtFacade: Codeunit "Application Area Mgmt. Facade";
FindRecordMgt: Codeunit "Find Record Management";
ReturnValue: Text[50];
IsHandled: Boolean;
ShouldErrorForFindDescription: Boolean;
begin
IsHandled := false;
OnBeforeValidateDescription(Rec, xRec, CurrFieldNo, IsHandled);
if IsHandled then
exit;
if Type = Type::" " then
exit;
if "No." <> '' then
exit;
case Type of
Type::Item:
ValidateItemDescription();
else begin
ReturnValue := FindRecordMgt.FindNoByDescription(Type.AsInteger(), Description, true);
if ReturnValue <> '' then begin
CurrFieldNo := FieldNo("No.");
Validate("No.", CopyStr(ReturnValue, 1, MaxStrLen("No.")));
end;
end;
end;
ShouldErrorForFindDescription := ("No." = '') and GuiAllowed() and ApplicationAreaMgmtFacade.IsFoundationEnabled() and ("Document Type" = "Document Type"::Order);
OnValidateDescriptionOnAfterCalcShouldErrorForFindDescription(Rec, xRec, ShouldErrorForFindDescription);
if ShouldErrorForFindDescription then
Error(CannotFindDescErr, Type, Description);
end;
}
so, I created a new field on PO Lines
field(1037; Description1; Text[2000])
{
Caption = 'Description1';
TableRelation = IF (Type = CONST("G/L Account"), "No." = CONST(''),
"System-Created Entry" = CONST(false)) "G/L Account".Name WHERE("Direct Posting" = CONST(true),
"Account Type" = CONST(Posting),
Blocked = CONST(false))
ELSE
IF (Type = CONST("G/L Account"), "System-Created Entry" = CONST(true)) "G/L Account".Name
ELSE
IF (Type = CONST(Item), "Document Type" = FILTER(<> "Credit Memo" & <> "Return Order")) Item.Description WHERE(Blocked = CONST(false),
"Purchasing Blocked" = CONST(false))
ELSE
IF (Type = CONST(Item), "Document Type" = FILTER("Credit Memo" | "Return Order")) Item.Description WHERE(Blocked = CONST(false))
ELSE
IF (Type = CONST("Fixed Asset")) "Fixed Asset".Description
ELSE
IF (Type = CONST("Charge (Item)")) "Item Charge".Description
else
if (Type = CONST(Resource)) Resource.Name;
ValidateTableRelation = false;
trigger OnValidate()
var
ApplicationAreaMgmtFacade: Codeunit "Application Area Mgmt. Facade";
FindRecordMgt: Codeunit "Find Record Management";
ReturnValue: Text[50];
IsHandled: Boolean;
ShouldErrorForFindDescription: Boolean;
CannotFindDescErr: Label 'Cannot find %1 with Description %2.\\Make sure to use the correct type.', Comment = '%1 = Type caption %2 = Description';
begin
IsHandled := false;
OnBeforeValidateDescription(Rec, xRec, CurrFieldNo, IsHandled);
if IsHandled then
exit;
if Type = Type::" " then
exit;
if "No." <> '' then
exit;
case Type of
Type::Item:
ValidateItemDescription();
else begin
//ReturnValue := FindRecordMgt.FindNoByDescription(Type.AsInteger(), Description, true);
if ReturnValue <> '' then begin
CurrFieldNo := FieldNo("No.");
Validate("No.", CopyStr(ReturnValue, 1, MaxStrLen("No.")));
end;
end;
end;
ShouldErrorForFindDescription := ("No." = '') and GuiAllowed() and ApplicationAreaMgmtFacade.IsFoundationEnabled() and ("Document Type" = "Document Type"::Order);
OnValidateDescriptionOnAfterCalcShouldErrorForFindDescription(Rec, xRec, ShouldErrorForFindDescription);
if ShouldErrorForFindDescription then
Error(CannotFindDescErr, Type, Description);
end;
}
FINALLY, I GOT ONE ERROR

so, Please help me to fix the issue
Regards,
Nagarjun M - D365 Technical Developer