I needed to perform a lookup on the Filing Status field from a new table I recently created. The lookup should restrict the Filing Status codes to those available for the Payroll Control Code contained on the same record in the table. This is exactly the same process that is used in the Navision Employee Tax Info table for the Filing Status Lookup. I basically used Navision's code in my table in the lookup trigger for Filing Status as follows:
LoadTempFilingStatusTable;
TempFilingStatus.Code := "Filing Status Code";
IF FORM.RUNMODAL(10107,TempFilingStatus) = ACTION::LookupOK THEN
"Filing Status Code" := TempFilingStatus.Code;
The system complied this code, but when I execute it, I get the following Error:
The following C/AL functions can be used only to a limited degree during write transactions (because one or more tables will be locked).
Form.RunModal()is not allowed in write transactions.
Why am I getting this error? How is Navision able to use it in the Employee Tax Info Table? Any ideas?
0
Comments
... if the error occurs in your table, but not in the table where you got the code from, then in the original table there is no writing transaction started. So the process cannot be exactly the same. Do you perfom any INSERT, MODIFY, DELETE or RENAME before this code ?