Dear all,
I have a problem relate to C/AL code. the problem is when I create Sales Order and insert the item in the line along with qty of item to a certain customer, then fill the requested delivery date, afterwards shipment date, where both of them is in the same date, but when I change shipment date earlier than delivery date or vice versa, this message windows come:
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 return value is not used. For example, 'OK :=CodeUnit.RUn()' is not allowed.
Report.RunModal() is allowed in write transactions only if 'RequestForm = FALSE'.
For example,'Report.RunModal(...,FALSE)' is allowed.
DataPort.RunModal() is allowed in write transactions only if 'RequestForm = FALSE'.
For example, 'DataPort.RunModal(...,FALSE)' is allowed.
Use the COMMIT function to save the changes before this call, or structure the code differently.
Pls let me know how to cope with this problem. I never find this problem before and I never change the codeunit, and add anything else.
#-o ](*,) :-k
tku for your atttention
rgds,
Johnson "the greatest Danish" Alonso
0
Comments
The second option is find where
ItemCheckAvail.SalesLine is called and comment out in the following code
this line needs to be changed
(CalledByFieldNo = FIELDNO("Shipment Date")) in above.
Third option is to create a functionon sales line let say skipItemavailcheck
call this function before validation and set a global boolean (SKIPITEMAVAILBILITY) to true in that function. Then add the boolean to the above if statement
NOT (Nonstock OR "Special Order")
//Start mod
AND NOT SKIPITEMAVAILBILITY
//End mod
THEN
ItemCheckAvail.SalesLineCheck(Rec);[/code]
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I still got the problem.
sea-navision-community-subscribe@yahoogroups.com
detail in:
http://sea-navision-community.blogspot.com
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
8)
nevertheless, tku.
rgds,
sea-navision-community-subscribe@yahoogroups.com
detail in:
http://sea-navision-community.blogspot.com