Hello, I try to use a form to display some Results of search with a special form. I try to use this form with Runmodal...
I create the values in the Table bfPOTracking and will display this values in the new form Trackform. But I get the error:
Form.Runmodal() ist nicht erlaubt in Schreibtransaktionen....
Source:
bfLOT.RESET;
bfLOT.SETRANGE("Item No.",POCallLine.Itemno);
bfPOTracking.RESET;
REPEAT
bfPOTracking.ItemNo:=POCallLine.Itemno;
bfPOTracking.PONo:=POCallLine.PONo;
bfPOTracking.LotNo:=bfLOT."Lot No.";
bfPOTracking.Quantity:=bfLOT.Quantity;
bfPOTracking."Trading Unit No":=bfLOT."Trading Unit Number";
bfPOTracking."Req. Quantity":=POCallLine.QuantityTotal;
IF bfLOT.Quantity<>0 THEN
bfPOTracking.INSERT;
UNTIL bfLOT.NEXT=0;
CLEAR(TrackForm);
TrackForm.SETTABLEVIEW(bfPOTracking);
TrackForm.SETRECORD(bfPOTracking);
if TrackForm.RUNModal=LookupOK Then Begin
.....some functions
End;
0
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
So if you only need the datas to display use the table temporary or if your transaction is really finished use commit, but doen't create "half" datas or fill your table from a function of you called form.
regards
It means, that the variable of type record is marked as "Temporary" (see properties of the variable). In this case, what you write into this "temporary" table, is done only on client, and the changes are not transfered into DB server. It means no write transaction on server, thus you can run form over this as modal without need for COMMIT. If you want to know more about temporary tables, I recommend to read some documentation/manuals etc.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.