Hi, I don't really know what is the problem here but you should keep salesLine.doInsert(); salesLine.calcCreditEstimate(); in that order. Atleast here, they are in that order and there's no problem. Plus, in Ax 3.0 "SP0" it was salesLine.calcCreditEstimate(); salesLine.doInsert(); and then in some Service Pack between 1 and 3 they changed it to salesLine.doInsert(); salesLine.calcCreditEstimate(); So that must be the correct order.
Is your Sales module pretty plain or you've made some modification? Maybe 2 users really modify the same line (will happen a lot i guess if many users can work on the same sales order) or there's a batch process that modify sales line of an order that the user is already in. Those a bit tricky to catch. Good luck! Steeve... --- In Axapta-Knowledge-Village@yahoogroups.com, "Learning Ax" <[EMAIL PROTECTED]> wrote: > > Hey All, > > Many times we get the following error message while saving the salesline > record > > Cannot edit a record in Order lines (SalesLine). > Another user changed one or more fields in the record, or the Form has not > selected all fields. Use Restore on the Command menu to get the new value. > > Do anyone have idea why we get this error? > > I have read in one post this is the error bcoz of following lines in the > Insert method of SaleLineType class: > > salesLine.doInsert(); > salesLine.calcCreditEstimate(); > > We get this error bcoz this is updating some fields after inserting the > record. > > And this error will not be there if we change the sequence of the statement > i.e. > > salesLine.calcCreditEstimate(); > salesLine.doInsert(); > > > Please let me know if anybody has any idea abt this. > > -- > Cheers! > Learning Ax