Windows Logins list takes 30 seconds to appear

afarrafarr Member Posts: 287
When I open the Windows Login table (from the Object Designer), it takes about 30 seconds to retrieve the list of logins (there are just 50 logins).
Does anyone know how (or if) this can be speeded up, or if there is some faster way of retrieving the list of windows logins?

I searched for more than an hour with Google and on this forum, and didn't find any relevant information.
But it seems that there should be a faster way, because when I go to Tools – Security – Windows Logins, the list appears immediately.




Some more details:
1. The Windows login table has two flowfields – ID and Name – with the following CalcFormulas:
Lookup("SID - Account ID".ID WHERE (SID=FIELD(SID)))
Lookup("Windows Access Control"."Company Name" WHERE (Login ID=FIELD(SID)))

2. The Login table and Windows Access Control table both open up quickly, but their data is not always accurate, e.g. I added one user and deleted another, and then closed and reopened my client, and the new user does not appear in either table (but he appears in the Windows Login table).

3. I need this because the client wants to add a new table with a Supervisor field, which links to the Windows Login table (and the Database Login table – it actually uses the LookupUserID function from Codeunit 418 Login Management).


Thanks,
Alastair
Alastair Farrugia

Comments

  • kinekine Member Posts: 12,562
    The table is loading the data from Active Directory. And this process can take some time. It is common that the first open of this table take long time.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • afarrafarr Member Posts: 287
    Thanks Kine. Unfortunately it's not just the first time - it takes over 20 seconds each time that I open it.

    I will probably retrieve data from the Login table instead. This won't reflect any logins that have been added or removed in the last few minutes, but I will create a job to update the Login table once a day (for example), as well as giving the user the ability to update the Login table immediately by pressing a button.
    Alastair Farrugia
  • kinekine Member Posts: 12,562
    You can use some singleinstance codeunit which will retrieve the data just once into some temporary table and than all functions will be using this temporary copy.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • afarrafarr Member Posts: 287
    Thanks for the suggestion, but I will still need to keep the temporary table updated, so I don't think that it would make much difference.

    I also don't understand how "Tools - Security - Windows Logins" can retrieve the list of logins so quickly. I guess it's getting the data from a different source - is there any way to access this source, instead of using the Windows Login table?
    Alastair Farrugia
Sign In or Register to comment.