Hi Everyone,
I get a message that "another user has modified the record for this Sales Header" when I try to release a sales order after entering a sales line.
I am on the Sales Line subform and either click on the release command or use the keyboard shortcut and the result is the same. If I click out of the subform to the main form and then release I have no problems.
Also if I acknowledge the error and try to release again, I have no error.
I have tried a
CurrForm.Update
and even
SalesHeader := Rec;
SalesHeader.SETRECFILTER;
ReleaseSalesDoc.PerformManualRelease(SalesHeader);
in the OnPush trigger, but with no luck.
I can't find anything that is changing the filters on the main form record while looking through the code coverage, and CU414 hasn't been changed.
Any thoughts?
Thanks in advance...
0
Answers
I know it's something small that I'm overlooking.
http://www.interdynbmi.com
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
On debugger you can select the Context when you view the variable window (Alt + 2). In the drop down list there you can see the functions from where your function with error is called.
Regards
I've run it again looking at the debugger with the code coverage running.
There were a couple of calls to get the Sales Header, but I didn't see any assignments to any of the Sales Header fields.
After inserting the Sales Line, I stopped the client monitor and it doesn't have the Sales Header listed.
I tried to use the zoom, but it shows the same because I have to change focus from the subform back to the main form, and once I do that it synchs back up and will work.
The modify that causes the error is in CU414. It is the release function.
EDIT: I was not looking at client monitor, but code coverage.
Thank you both, when I finally ran the client monitor, filtered for table 36, the update stood out and I found the modify call. Fixed it and everything is good.
http://www.interdynbmi.com