Field Value Used for Release Time of Sales Orders?

gadzilla1gadzilla1 Member Posts: 316
Hello all,

A report my company uses displays "Sales Header"."Entry Time".

Has anyone out there created functionality for the Sales Order 'Release' time as well? Is this available somewhere already in NAV?

If not I'd appreciate any options anyone has available.

Thanks and have a great day - Chris

Answers

  • DaveTDaveT Member Posts: 1,039
    Hi Chris,

    This is not a difficult mod - but will need an developent licence. add a field to the sales header for time released and add code to the release codeunit (414) to set this.
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • gadzilla1gadzilla1 Member Posts: 316
    Thanks Dave! Do you have a code sample to test with? I have some ideas but want to make sure I'm on the correct path.

    Regards - Chris
  • SavatageSavatage Member Posts: 7,142
    if someone re-opens it & re-releases it you want the time to be updated?
  • DaveTDaveT Member Posts: 1,039
    Hi Chris,

    just add
    if "Release Date" = '' then  
      "Release Date" = today;
    if "Release Time" = '' then  
      "Release Time" = Now;
    
    

    before the modify statement in the onrun trigger of codeunit 414. The if statements are to give the first release so remove them to get the last release - only an issue if reopened and re-released.
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • DaveTDaveT Member Posts: 1,039
    Savatage wrote:
    if someone re-opens it & re-releases it you want the time to be updated?
    GMTA :wink:
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • SavatageSavatage Member Posts: 7,142
    yea i was thinking. Add Released Time to Sales Header Table

    in 414 add OnRun
    ...
    ...blah..
    ...blah..
    END;
    "Released Time" := TIME; //<-insert here
    MODIFY(TRUE);
    ...
    ...

    your code I see checks to see if the field is filled an bypasses it if it is.
    if you want it updated each time just lose the IF & '' part.
  • SavatageSavatage Member Posts: 7,142
    IHTG GMTA :oops:

    just kidding (I Had To Google GMTA) :-$
  • DaveTDaveT Member Posts: 1,039
    Savatage wrote:
    IHTG GMTA :oops:

    just kidding (I Had To Google GMTA) :-$

    Hi Harry,

    Saw it on a post on Tuesday and had to google it myself :mrgreen:

    Not up on these abbreviations and took me a while to figure out IHTG - I think you've invented a new one :wink:
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • gadzilla1gadzilla1 Member Posts: 316
    LOL on the IHTG GMTA stuff...

    Thanks much to both of you for your help - I coded out something similar and you've provided validation. I will set this as solved. Have a great day - Chris
  • SavatageSavatage Member Posts: 7,142
    IHTG - I made it up :mrgreen:

    I Had To Google
  • gadzilla1gadzilla1 Member Posts: 316
    Funny!

    Thanks again for the input...I thought there was native release time, date somewhere in NAV. Since I needed an updated time EVERY time an open then release occurred I just wrote:


    "Release Date" := TODAY;
    "Release Time" := TIME;
    MODIFY(TRUE);

    ...in the OnRun of Codeunit 414. Have a great day - Chris
Sign In or Register to comment.