Hi all,
I try to use trigger Onpush() on menu item? but it doesn't happen anything

what i do wrong?
With this code
IF NOT CONFIRM(Text002) THEN
EXIT;
IF PurchLineRec.FIND('-') THEN
REPEAT
InspecEntry.COPY(PurchLineRec);
InspecEntry."Document Type" := PurchLineRec."Document Type";
InspecEntry."Document No." := PurchLineRec."Document No.";
InspecEntry."Source Line No." := PurchLineRec."Line No.";
InspecEntry."Item No." := PurchLineRec."No.";
InspecEntry.Quantity := PurchLineRec.Quantity;
InspecEntry."Unit of Measure" := PurchLineRec."Unit of Measure";
InspecEntry."Inspection at Location" := PurchLineRec."Location Code";
InspecEntry.INSERT;
UNTIL PurchLineRec.NEXT = 0;
where i should to set more? I need to copy some field from purchase Line to new table called Inspection Entries
Thank in advance
klum
Comments
I have a very similar code like yours, and it works well.
The difference is I don't use RECORD.COPY(Record2).
Try to MESSAGE them...
Jemmy
did you remove the "PushAction" entry in the properties?
or have you only removed the "RunObject" entry?
am i right that even the "CONFIRM(Text002)" does not fire?
br
Josef Metz
Josef Metz
Thanks
so I try to change some thing like this.
IF PurchLineRec.FIND('-') THEN
REPEAT
InspecEntry.INIT;
InspecEntry."Source Table No." := 39;
InspecEntry."Document Type" := PurchLineRec."Document Type";
InspecEntry."Document No." := PurchLineRec."Document No.";
InspecEntry."Source Line No." := PurchLineRec."Line No.";
InspecEntry."Source Inspection Type" := InspecEntry."Source Inspection Type"::Purchase;
InspecEntry."Item No." := PurchLineRec."No.";
InspecEntry.Quantity := PurchLineRec.Quantity;
InspecEntry."Unit of Measure" := PurchLineRec."Unit of Measure";
InspecEntry."Inspection at Location" := PurchLineRec."Location Code";
InspecEntry.INSERT;
UNTIL PurchLineRec.NEXT = 0;
MESSAGE(Text002);
It WORK!! now \:D/
Table structure has important role.
Congrats Klum!
Jemmy