Options

Global setups

Cem_KaraerCem_Karaer Member Posts: 281
Hello,

There are several setup gets in the posting routines (sales, purchase or journal ect.) I want to get (using GET function) a setup (Sales & Receivables, General Ledger Setup ect.) table once, put it in a global cache (single instance codeunit) and access this cache whenever that setup is required.

Does anybody have such a working experience?
Cem Karaer @ Pargesoft
Dynamics NAV Developer since 2005

Answers

  • Options
    AKAK Member Posts: 226
    IMHO not worth the effort. The data is already in the cache after the first GET and isn't that big after all. But if you really need it for some reason, here is something to read.
  • Options
    Cem_KaraerCem_Karaer Member Posts: 281
    @AK, thanks for your reply.

    We have several subscriber methods listening posting routines. We had to check entry values (and sometime modify) with some setup values in those subscribers so we have to get the same setup table (defined locally) everytime the subscriber method is hit. Will it make any difference to define the local setup tables as global ones?
    Cem Karaer @ Pargesoft
    Dynamics NAV Developer since 2005
  • Options
    AKAK Member Posts: 226
    I'm no expert on how the cache works exactly, but I would assume that it makes no difference if a record is used as a local or as a global variable, otherwise a cache would be rather pointless.
    What problem are you trying to solve exactly?
Sign In or Register to comment.