GetSetup functions

genericgeneric Member Posts: 511
Hello In NAV in many posting and tables you have functions like in CU 22

GetGLSetup
GetMfgSetup
GetInvtSetup

Etc.

in these functions

you have
IF NOT InvtSetupRead THEN BEGIN
  InvtSetup.GET;
  SourceCodeSetup.GET;
END;
InvtSetupRead := TRUE;

So they are basically trying to not call Get multiple times.

but if the NAV client already caches the entries and even if you call GET, it will not call sql twice, I'm wondering why the code is still there. Is this just for Native db?


Thanks.

Comments

  • kapamaroukapamarou Member Posts: 1,152
    generic wrote:
    but if the NAV client already caches the entries and even if you call GET, it will not call sql twice
    Maybe in some cases it would call again the record. I don't know.

    But another reason would be (at least in my thinking since I've used it that way) the following: To make sure that the setup does not change throughout the process.
Sign In or Register to comment.