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. CodeUnit.Run is allowed in write transactions only if the ret--- w

Hi All,

I have loaded some data using data migration. while migrating it shows me some error message like

"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.CodeUnit.Run is allowed in write transactions only if the ret"

on Some fields like “City”. But that city name is already defined in postal codes. if we give manually it is taking.

can anybody solve this problem.

Regards,

Venkatesh

Which version of Navision you are using ??

hi

2009 R2

regards,

Venkatesh

The error-msg says it all:
When in a write-transaction you are not allowed to use command RUNMODAL.

Example:
1 Rec.FINDFIRST;
2 Rec.Field123 := ‘ABC’;
3 Rec.MODIFY;
4 FORM.RUNMODAL(1234);

  • this will cause same error-message.
    It is #3 and #4 that can’t be used in that order.
    You may change the command order - but then you may not acheive what you want.
    Putting a COMMIT in between 3 and 4 will resolve you current problem. But that may cause other problems…!