Hi mates
It's me again! Need your help.
I created a new column (Custom Description) on Vendor Ledger Entry table and Vendor Ledger Entries page.
Now, I want that this new column show the first line of description depending on document type (or not)
I tried the next on Table:
field(79003; "Custom Description"; Text[100])
{
Caption = 'Custom Description';
Editable = false;
// FieldClass = FlowField;
// CalcFormula = lookup("Purch. Inv. Line".Description where("Document No." = field("Document No.")));
}
Ignore the bars please. Whit that, I only have Purch. Inv. Line description.
The next I tried was (on Page) to classify by serial number because I can't compare Enum (Document Type) like String:
-> Operator '=' cannot be applied to operands of type 'Enum "Gen. Journal Document Type"' and 'Text'
var
CustDescFac: Record "Purch. Inv. Line";
CustDescAb: Record "Purch. Cr. Memo Line";
trigger OnAfterGetRecord()
Begin
if SerialNumber = 'C-FAC+' then
CustDescFac.Description := Rec."Custom Description";
if SerialNumber = 'C-AB' then
CustDescAb.Description := Rec."Custom Description";
end;
And need something that check or put every line.
Any ideas?
Thank you so much! :D