Weird standard functions

rocatisrocatis Member Posts: 163
Does anybody have a clue what the function UTlocalCall is used for? It exists in about 7 objects (e.g. codeunit 6620) but are not called from anywhere.

I can't work out what on Earth the purpose of the functions is :-k
Brian Rocatis
Senior NAV Developer
Elbek & Vejrup

Comments

  • ara3nara3n Member Posts: 9,256
    I ran it through dev toolkit and it's not used anywhere.
    It could be unfinished functionality.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • themavethemave Member Posts: 1,058
    not a developer, so don't really know, but the all knowing google search, finds it

    looks like it might be related to closing inventory periods, I would imagine it was part of the program a long time ago, but the code was replaced and this is just a rement that was forgotten.

    http://www.google.com/search?hl=en&source=hp&q=UTlocalCall&aq=f&aqi=&aql=&oq=&gs_rfai=Ci_JdMk90TOn8GpSEygTruKXYDwAAAKoEBU_Q0_qN
  • rocatisrocatis Member Posts: 163
    themave wrote:
    the all knowing google search, finds it
    No, it doesn't. Those hits simply refer to a text dump of the function(s) - exactly like your search now finds this conversation.

    Looking at the function in codeunit 22 probably gives a clue as to its use:
    UTlocalCall(localFunctionName : Text[30];VAR param : ARRAY [20] OF Variant;VAR return : Variant)
    CASE localFunctionName OF
      'IsAvgCostException':
        BEGIN
          ValueEntry := param[1];
          IF param[2].ISRECORD THEN
            ItemJnlLine := param[2];
          IF param[3].ISRECORD THEN
            InvtSetup := param[3];
          IF param[4].ISRECORD THEN BEGIN
            ValueEntry2 := param[4];
            ValueEntry2.INSERT;
          END;
          return := FALSE; //ValueEntry.IsAvgCostException;
        END;
      ELSE
        ERROR('Local function %1 is not included for test.',localFunctionName);
    END;
    
    Basically, it sets the value of global variables (and even inserts records) which is almost certainly used for testing purposes at Microsoft.
    Brian Rocatis
    Senior NAV Developer
    Elbek & Vejrup
Sign In or Register to comment.