Order planing problem

csicso
csicso Member Posts: 10
Hi everyone!

I have a problem with Order Planning in NAV 4.0 SP2 on SQL Server.
When I try to create an Order, I've got an error:
"The following C/AL functions can be used only to 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 ..."

This function is worked when we used the native database.

Any idea?

Thanks!

PS: sorry my english

Comments

  • kriki
    kriki Member, Moderator Posts: 9,121
    Probably this function was not run on the native client. Or there was a COMMIT before it without starting a new transaction.
    I would use the debugger to see where the error is how he got there.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • csicso
    csicso Member Posts: 10
    Thanks, I try it
  • csicso
    csicso Member Posts: 10
    I've started the debugger, the error comes in this Codeunit:

    333 Req. Wksh.-Make Order
    In this function: TryCarryOutReqLineAction(ReqLine)

    But this is too complicated for me, I'm a beginner NAV developer
  • kriki
    kriki Member, Moderator Posts: 9,121
    I think you get the error on this line:
    IF NOT TryCarryOutReqLineAction(ReqLine) THEN BEGIN
    

    NAV gets to this line if this is true:
    IF PlanningResiliency THEN BEGIN
    
    Now you should search WHY this boolean is true.

    This means you have to check the complete batch and follow how you get there.
    This is not so easy for a beginning developer, so I would suggest you involve a senior developer.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!