Issue with Sales Line acting Released?

jversusjjversusj Member Posts: 489
Anyone ever seen a scenario where the sales line "looks" released, but the header status = Open?

I found some custom code in this system that looks like it might be part of the reason. On Push for a control, our Developers put in code:
..stuff happening...
status := status::open
MODIFY;
COMMIT;
It then runs a loop on the sales lines and finishes with
status := status::released
MODIFY;
COMMIT;

we were seeing an error "another user has modified the record..." which led me to discover that the sales lines had "Amount" and "Amount including Tax" defined, even though the sales header said Open. trying to manually reopen the doc woudl not clear these values.

my theory is: user was in the release process and the custom code above forced the status to open to run the loop on the sales line when a lock out occured that kicked the process out with the header status forced to open but the lines still "released." is that a reasonable hypothesis?
kind of fell into this...

Comments

  • SavatageSavatage Member Posts: 7,142
    Sounds reasonable.

    What is the purpose of this button?
    When does the user use it?
  • DaveTDaveT Member Posts: 1,039
    Hi Jversusj,

    Look to me as an inexperenced developer wanted to calculate the total of the sales order and is forcing the release to populate the amount, etc fields. If you are finding this code I wonder how many more "Fixes" are in place 8-[

    Funny on the GB/IE versions there is no release at line level - just on the header.
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • David_SingletonDavid_Singleton Member Posts: 5,479
    DaveT wrote:
    Hi Jversusj,

    Look to me as an inexperenced developer wanted to calculate the total of the sales order and is forcing the release to populate the amount, etc fields. If you are finding this code I wonder how many more "Fixes" are in place 8-[

    Funny on the GB/IE versions there is no release at line level - just on the header.

    The US version also does not release at line level. This is probably a customization.
    David Singleton
  • SavatageSavatage Member Posts: 7,142
    DaveT wrote:
    Look to me as an inexperenced developer wanted to calculate the total of the sales order and is forcing the release to populate the amount, etc fields.

    let us know if this is true, there are better ways to accoumplish this without messing with the released function
  • jversusjjversusj Member Posts: 489
    the button is a gatekeeper on Order Release functionality. When they click this button, the system will verify data in many fields and dump the user out of the routine if they forgot to enter a code in a monitored field.

    it gets further complicated because we use Jobs Manager, and one of the last things the button push does is call a function to insert and 'roll-up' a jobs entry into the sales line. My guess is that the order has to be released to accomplish one thing, but then 'open' in order to add sales lines for the jobs. We then get this sporadic issue where the line 'looks' released for all intents and purposes, but the header shows 'open.' note that there is nothing on our sales line record regarding status - just evidence that it is somehow still released (calculated values, etc.).
    kind of fell into this...
Sign In or Register to comment.