I have putted in Cons. Journal a buttom copying the same C/AL Code that is in
Funtions - Calc. Co&nsumption.
CalcConsumption.SetTemplateAndBatchName("Journal Template Name","Journal Batch Name");
CalcConsumption.RUNMODAL;
i want when you click in the buttom, if you are positioned in the 3rd line in Cons. Journal, the report Open with the Prod. Order No. that is filled in the line in Cons. Journal.
ProdOrder.SETRANGE("No.","Document No.");
REPORT.RUNMODAL(REPORT::"Calc. Consumption",TRUE,TRUE,ProdOrder);
With this code in OnPush() i can do it, but when i accept the request Form an error show. Because Journal Template Name is empty. How with the second code can i do the funtion of:
CalcConsumption.SetTemplateAndBatchName("Journal Template Name","Journal Batch Name");
Regards
Comments