Hi Guys,
I'm trying to insert a new line record in Sales Line Table from Sales Invoice form. System is throwing a following error.
"You cannot make any changes in the database until a transaction has been started"
Can you please let me know how can i overcome this issue in C/SIDE?
Thanks and Regards
Rajini
0
Comments
http://www.BiloBeauty.com
http://www.autismspeaks.org
Are you doing something other than order entry thru the form?
is this error coming due to a dataport or something?
Have you tried turning on the debugger and seeing where it is stopping?
Also I've seen that 5.0 SP1 fixes..
8/27/2008. KB 954722. Build 27253. "Microsoft Dynamics NAV can crash in certain situations. Some times, you will receive this error message:You cannot make any changes in the database until a transaction has been started."Or, "Error 1247 in module 19". Or, some times the NAV application will just terminate."
edit..
..More info needed on what you are trying to do that causes this error.
http://www.BiloBeauty.com
http://www.autismspeaks.org
Code like this:
NVSalesLine.INIT;
NVSalesLine."Document Type":=2;
NVSalesLine."Document No.":='1005';
NVSalesLine."Line No.":=10000;
NVSalesLine.Quantity:=1;
NVSalesLine."Unit Price":=1.55;
NVSalesLine.INSERT(FALSE);
I'm getting error message from last line.
Usually such code is placed on the Table object, on the OnValidate trigger of a field for example. Do you need this code on the form?
Also try other triggers like OnValidate of the field on the form...
OnPush()
Note: I would change where you have hardcoded values such as a qty/price/& item# & put it in a setup table where you can change the values if need be.
http://www.BiloBeauty.com
http://www.autismspeaks.org
But, Records are not displayed in Invoice Subform (Line Detailes) immediately. Its displayed once I close and open the window.
This is the code I added for displaying the new record.
NVSalesInvoiceSubForm.GETRECORD(NVSalesLine)
Do you know any other method for displaying record?
Thanks,
Rajini
currform.update;
http://www.BiloBeauty.com
http://www.autismspeaks.org