update problem on PO subform

fred69fred69 Member Posts: 16
Hello,
Please follow these steps :
- On a 4.XX version, open a purchase order with at least 2 lines. In the subform, ask the system to show the column "Promised receipt date".
- Change the promised receipt date on the header and answer yes to the question asking you if you want to update the lines.
- If ou click on the second line of the subform, all the lines are updated according to the date you entered on the header

BUT

if you click on the first line of the subform, in the field "Promised receipt date" this line is not updated !!!

Does anyone have any idea about this amazing behaviour ? It's as if the system doesn't behave the same way if you click on the first line or on one of the following lines...

Comments

  • themavethemave Member Posts: 1,058
    No answer, but I can confirm it has the same behaivor in our us version 4.0 database.

    pretty wierd
  • Miklos_HollenderMiklos_Hollender Member Posts: 1,598
    Wow, you found a juicy bug. If you just click anywhere outside the field, and close the form, the dates are correct. Therefore, the OnValidate of the field and the OnModify of table 38 must be correct.

    The point is, it only happens if you click into the Promised R.D. of the line. F.e. if you click into the Planned R.D. on the line after changing the Promised R.D. then the Promised R.D. will be correct but the Planned R.D. won't be! And if you click into f.e. the Description of the first line after changing the Promised R.D. then it will all be correct.

    That's really weird. The only trigger that could make a difference here is the OnActivate and that contains no code. I have no idea...

    :-k
  • girish.joshigirish.joshi Member Posts: 407
    I have seen this kind of behavior before. Not really a bug, because its system-wide. Its because the auto-save propety (or something like that) is set on the subform and because the funny way that the forms get refreshed.

    What's actually happening is that when you select "update lines, yes", the lines are updated, but the form isn't refreshed.

    So at this stage, the database has the right data, but the form is displaying the wrong stuff.

    When you click on the subform, it triggers a refresh on the subform, so everything gets updated with the right data.

    The problem is, if you click on the same field, Navision thinks that you have just reinserted the old data, like you cut and pasted it into the field. As soon as you move off the field, that change goes into the database and because of the "auto-save" prop, is immediately committed.

    Haven't verified this by looking at the app, but this was my experience with something else in the past.
  • DenSterDenSter Member Posts: 8,307
    Yep I agree, this has been there for along time. You'll find the same behaviour in all areas that have the 'update all lines' process. It only happens if you click one of the fields in the lines that were just updated by that process. The workaround is not to do that, to click the header part when you update the fields before going into the lines area.
  • ara3nara3n Member Posts: 9,258
    I'm wondering why they never fixed it?
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • DenSterDenSter Member Posts: 8,307
    Not high enough on the list of priorities :mrgreen: since the workaround is really easy. Course that is just my guess.
  • fred69fred69 Member Posts: 16
    Thanks a lot for all the answers ! It will help me towards the customer... to show him that other companies in the world accept some problems without sending thousand letters... ](*,)
  • girish.joshigirish.joshi Member Posts: 407
    One work around would be to put some code in the onvalidate trigger to send keys to change the focus to force navision to update the lines.

    Its a little clunky, but way better than all of the timer based solutions.
Sign In or Register to comment.