"Qty. to Receive" and "Qty. to Invoice"

navuser1navuser1 Member Posts: 1,329
Hi All,

I’m working on Nav 5.0 SP1 IN (Native).

The Fields “Qty. to Receive” and “Qty. to Invoice” of the SO/PO Document gets populate automatically at time of entering the amount at the “Quantity” Field.

But our client does not satisfy with this.They have individual users to enter data into this fields.

To do this I have to modify some code. But I don’t to modify the Base Code (against Navision principle) in the table Level. To do this I add some code at Form Level (Quantity - OnValidate ()) and (Location Code - OnValidate ()).

It’s working.

But after the posting the SO/PO Document the Same two fields gets automatically populate again.
Where I have to check for this?

If I’m working against Navision than suggest me.. :roll:
Now or Never

Comments

  • Alex_ChowAlex_Chow Member Posts: 5,063
    Check the Sales & Receivables Setup, it has a field to initalize Qty. to Ship fields.
  • navuser1navuser1 Member Posts: 1,329
    Alex Chow wrote:
    Check the Sales & Receivables Setup, it has a field to initalize Qty. to Ship fields.


    Thanks for your reply.
    I think this setup is not availble in Nav 4.0 SP3.
    Now or Never
  • navuser1navuser1 Member Posts: 1,329
    Alex Chow wrote:
    Check the Sales & Receivables Setup, it has a field to initalize Qty. to Ship fields.

    It's working at time of entering the value in the Quantity field.
    But after selecting the Location Code the "Qty. to Receive" gets automatically
    populated. :cry:
    Now or Never
  • David_SingletonDavid_Singleton Member Posts: 5,479
    You should not put code on Forms that modifies data.
    David Singleton
  • navuser1navuser1 Member Posts: 1,329
    You should not put code on Forms that modifies data.

    Ok David
    Thanks for your suggestion.
    Now or Never
  • garakgarak Member Posts: 3,263
    start the debugger or Codecoverage to see where the Qty fields are filled ;-)
    Do you make it right, it works too!
  • navuser1navuser1 Member Posts: 1,329
    Alex Chow wrote:
    Check the Sales & Receivables Setup, it has a field to initalize Qty. to Ship fields.


    This check working for the Quantity field.
    But When we select the Location code it is not working.

    What is the solution for that ??

    Can I put some code or Call the same funtion-SetDefaultQuantity
    at the end of the Location Code - OnValidate() trigger ??
    Now or Never
  • navuser1navuser1 Member Posts: 1,329
    garak wrote:
    start the debugger or Codecoverage to see where the Qty fields are filled ;-)


    Ok Garak.
    It will take lots of time :mrgreen:
    Now or Never
  • DenSterDenSter Member Posts: 8,305
    navuser1 wrote:
    It will take lots of time :mrgreen:
    Yes this is a deceivingly difficult task. There are a few function calls that initialize those fields, and update the amounts on the line, and they all work together in a very funky way, to make it so that it's all consistent.

    One of the reasons why you can't make it work right is that you put the code on the form, where it doesn't belong. I hope you are taking David's comment seriously, and that you removed the code from the form. This type of code belongs in the table.
  • navuser1navuser1 Member Posts: 1,329
    DenSter wrote:
    One of the reasons why you can't make it work right is that you put the code on the form, where it doesn't belong. I hope you are taking David's comment seriously, and that you removed the code from the form. This type of code belongs in the table.

    Yes DenSter. I follow the David's comments.
    It's working fine.

    Thanks to all . =D>
    Now or Never
Sign In or Register to comment.