Hi experts!! NAV2017
In the Item Journal Line I have a new field "No Etiqueta", TableRelation Etiquetas (50000)
I need that when the field Etiqueta are validated the fields "Order No", "Document No" and "Item No"
are automatically filled getting the data from the Product Order Line table
My code:
No. Etiqueta - OnValidate()
Etiquetas.SETRANGE("No. Etiqueta","No. Etiqueta","No. Etiqueta");
ProOrdLine.SETFILTER("Item No.",Etiquetas."No. Referencia");
ProOrdLine.SETFILTER("Starting Date",'<=%1',WORKDATE);
"Posting Date":=WORKDATE;
"Item No.":=Etiquetas."No. Referencia";
"Order No.":=ProOrdLine."Prod. Order No.";
"Document No.":=ProOrdLine."Prod. Order No.";
But does nothing.
0
Answers
SORRRYY
TOO MANY HOURS WORKING
WHAT A SHAME!!
Etiquetas.SETRANGE("No. Etiqueta",Rec."No. Etiqueta",Rec."No. Etiqueta");
ProOrdLine.SETFILTER(Status,'Released');
ProOrdLine.SETFILTER("Item No.",Etiquetas."No. Referencia");
ProOrdLine.SETFILTER("Starting Date",'<=%1',WORKDATE);
IF ProOrdLine.FINDLAST THEN BEGIN
Rec."Posting Date":=WORKDATE;
VALIDATE(Rec."Posting Date");
Rec."Order No.":=ProOrdLine."Prod. Order No.";
VALIDATE(Rec."Order No.");
Rec."Document No.":=ProOrdLine."Prod. Order No.";
VALIDATE(Rec."Document No.");
Rec."Order Line No.":=ProOrdLine."Line No.";
VALIDATE(Rec."Order Line No.");
Rec."Item No.":=ProOrdLine."Item No.";
VALIDATE( Rec."Item No.");
Rec."Operation No.":='999';
VALIDATE(Rec."Operation No.");
Rec.Quantity:=Etiquetas.Cantidad;
VALIDATE(Rec.Quantity);
END;
Thanks for all!! and Merry chrystmas
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!