Options

Strange code on NAV 2013 Page 1007 Job Planning Lines

urpokurpok Member Posts: 23
edited 2013-10-02 in NAV Three Tier
Hello Fellow NAVisionists.
Recently one of our customers ordered me to do some changes in Jobs module.
Now I have done some studying, and there seems to be some code in OnOpenPage trigger on Page 1007 I do not understand. Similar code is in Page 92 Job Ledger Entries.
    OnOpenPage=VAR
                 Job@1000 : Record 167;
               BEGIN
                 IF Job.GET(JobNo) THEN
                   CurrPage.EDITABLE(NOT (Job.Blocked = Job.Blocked::All));

//++huh?
                 IF ActiveField = 1 THEN;
                 IF ActiveField = 2 THEN;
                 IF ActiveField = 3 THEN;
                 IF ActiveField = 4 THEN;
// --huh?
               END;

ActiveField is Option type global with option string " ,Cost,CostLCY,PriceLCY,Price".
This code does not appear in nav 2009 page, only in 2013.
There is also a function SetActiveField which changes the ActiveField value, and it is usually called before opening this page from elsewhere.
However, in my opinion this code does nothing! Is there a hidden purpose for this code?

Any ideas, anyone? :-k
"There is no spoon."
--Matrix

https://navurpo.blogspot.com/?view=classic

Comments

  • Options
    SilverXSilverX Member Posts: 134
    Great catch urpok :D

    Looks like relicts from Form Transformation Tool. Original code was like this:
    IF ActiveField = 1 THEN
                       CurrForm."Total Cost (LCY)".ACTIVATE;
    
    These lines can be deleted without issues. It's only in Pages 92 and 1007.

    Cheers
    Carsten
    Cheers
    Carsten


    ==> How To Ask Questions The Smart Way

    This post is my own opinion and does not necessarily reflect the opinion or view of my employer.
Sign In or Register to comment.