Sales Line Subform -> Release Error

Joe_MathisJoe_Mathis Member Posts: 173
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...

Answers

  • garakgarak Member Posts: 3,263
    do you have some customized in your sales Line (or form) where you modify the Sales Header :?:
    Do you make it right, it works too!
  • Joe_MathisJoe_Mathis Member Posts: 173
    That was my first thought, but I haven't found anything in code coverage that actually makes any modification ](*,) ](*,)

    I know it's something small that I'm overlooking.
  • kinekine Member Posts: 12,562
    Try to use client monitor to find the point where the record is changed...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • garakgarak Member Posts: 3,263
    edited 2008-08-08
    Use Client Monitor or Debugger to find out, where the record is changed.
    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
    Do you make it right, it works too!
  • garakgarak Member Posts: 3,263
    Kine, you're to fast for me :-k
    Do you make it right, it works too!
  • Joe_MathisJoe_Mathis Member Posts: 173
    Thanks.

    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.
Sign In or Register to comment.