Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1280
  • Last Modified:

How to determine what option a user is at in GP Dynamics

Is there a way to know where a user is in GP either by SQL, VB.NET or by Retreiveglobal?

0
rayluvs
Asked:
rayluvs
  • 13
  • 7
  • 3
7 Solutions
 
Abdulmalek_HamshoCommented:
What do you mean by "Where"?
0
 
rayluvsAuthor Commented:
We've been having problems of who is at what option at any given moment.  That is, we have 5 user connected in various series and option (user1 is in PM doing check edit, user2 is GL printing statements; all user simultaneously).

What we are trying to do is to know at any given moment at what windows is USER1.

We seen a report in GP where it gives a history of where users visited, but is there anything that can tells us now?

We thought that maybe Retrieveglobal.dll could have an environment value that would give us the info.  Also, maybe a table that can tells us this (something like activity that tells who is connected).

Hope this info helped.

Thanx Lots!

0
 
Abdulmalek_HamshoCommented:
If the window the user is opening is a transactional windows; means it's intended to create/modify transactions; then you would find a record for it in the following table until it gets closed:

DYNAMICS.SY00800

With the User ID and Batch Name.

Or if you enabled tracking successful window open in Activity Tracking window, you can refer to the following table:

DYNAMICS.SY05000

You may enable Audit Trail feature, and track it in the Audit Trail Smartview.
0
Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

 
rayluvsAuthor Commented:
SY00800 works perfect, but it all depends if user "saves" the batch if any.  And and SY05000 is history.

What is Audit Trail feature and how can we test that?
0
 
Abdulmalek_HamshoCommented:
No, SY00800 doesn't depend on if user saves the batch or not.

Audit Trail is a very sophisticated tool that tracks each and every read and/or modification processed by the user. You can enable it in:

Dynamics GP -> System -> Audit Trails

You must select the entities that will be tracked. Don't include too many things, because it affects the performance of the system.

After enabling it, you can review the results in Inquiry -> Company -> Audit Trail Smartview.

Please read the Audit Trail document for further details and guidance.
0
 
rayluvsAuthor Commented:
Will try it.... but is Audit Trail online; that is, not dependen to historical?
0
 
Abdulmalek_HamshoCommented:
No, it tracks whatever you want to track and keep a history for it, similar to Activity Tracking but with more control on the tracked objects and better inquiry window.
0
 
rayluvsAuthor Commented:
Thanx for clearing that up.

With Retreiveglobal.DLL we cam know in a VB Apps who is logged and what company is logged on.  There has to be a way to know this info.

With this in mind, is there anything else that we can do?

Thank you.

0
 
Abdulmalek_HamshoCommented:
Why would one need to know what window every user is working on?

RetrieveGlobals has nothing to do with your requirement.
0
 
rayluvsAuthor Commented:
Understood.  I refer to Retreiveglobal.DLL for the way it works.  We know it has nothing to do with our requirement.  We refer to the DLL Because if the way it works; it knows the user who is logged, what company is logged on, etc.  So we figure maybe there is something similar out there that would know what option the user is at.  We refer to the DLL to give a clear concept of what we want.

As to why we need to know what option the user is at us because of the Check Links and Conciliation.   We have found that when these maintenance has to be ruined to a specific series/module, we have to always call and ask for users to exit said module.

We use a script to see who is logged (Dynamics..Activity), but that only tells us who is logged.

Hope this info helped in what we're aiming for.

Thank you
0
 
rayluvsAuthor Commented:
I guess, to rephrase the question:  "How to determine what module or series a user is logged in"
0
 
Abdulmalek_HamshoCommented:
Yes, this is exactly what SY00800 does. Check Links and Reconciliation check SY00800 to see if any related Batch or Transaction is locked.
0
 
Victoria YudinCommented:
I just posted a SQL view on my blog to show summary login information for users:
http://victoriayudin.com/2011/09/12/sql-view-for-user-activity-in-dynamics-gp/

You could change the code (or add to it) to give you details from the SY00800, SY00801 and dex_lock (in tempdb) tables instead of the summary count I am showing.  

However, based on your latest description of what you're looking to do - it is better to have all users out of GP completely when you are running both check links and reconcile (unless you mean something different by "Conciliation"?).  The reason for this is that even if the users are not in the modules you're looking to run check links / reconcile for before you start, there is nothing to prevent them from opening a window or starting a process after you launch check links or reconcile.  And there will not be anything you can do to predict that or prevent it, short of having all the users out.  Depending on what the user tries to do, they may get a message saying there is a process running, but that is not always the case.  I just tested this by starting check links on the entire Sales series, then opening the Sales Transaction Entry window and starting to enter a transaction.

What we typically do is run these processes off hours (or at times that are not so busy) and notify all users prior to this happening asking them to be out of GP and letting them know that they will be logged out of GP during a particular time slot if they are still in.  
0
 
Abdulmalek_HamshoCommented:
Moreover, Check Links and Reconciliation check the SY00500 table in the company DB for any under-posting/locked batches.

SY00801 also keep track of the documents being edited.
0
 
rayluvsAuthor Commented:
Hi Abdulmalek_Hamsho, when u mentioned sy00500 before we tested against what we want and u are correct, it checks for batches.  However, what we need is to know if the user is at the window option even if the user didn't vreat a batch.  We tested starting a transaction and the table didn't recognize any user since no batch file is open.  The reason we need know is to setup the user who is in charge of maintenance in order to notify the other user to exit the module.

From what we seen sy00500 is only useful if the user created a batch.
0
 
rayluvsAuthor Commented:
Hi victoria_y, didn't see your post; we'll check your links
0
 
rayluvsAuthor Commented:
Hi Victoria... we checked the script and it does tells us who is connected and batched info.  Unfortunately, it doesn't recognize when a user is at a certain screen (our of our question).  We wen to sales and called a transaction that was in a batch, and the script didn't display the result.

Is there a way we can detect when a user is at a certain window within GP, for example, PM Check Links, Customer Maintenance,  Item inquiry window?  We are not looking for historical or tracking info, we are looking for onlined or actual user connection regarding what window he/her is currently at.
0
 
Victoria YudinCommented:
As I mentioned, you will need to change the code to bring in the details for the linked in tables...I am just bringing in the record counts.    For example, the attached code brings all the details from those 3 tables:
SELECT
a.USERID GP_User_ID,
um.USERNAME [User_Name],
a.CMPNYNAM Company_Name,
a.LOGINDAT+a.LOGINTIM Login_Date_and_Time,
b.*, r.*, t.*

FROM DYNAMICS..ACTIVITY a

LEFT OUTER JOIN
DYNAMICS..SY00800 b -- batch activity
ON a.USERID = b.USERID

LEFT OUTER JOIN
DYNAMICS..SY00801 r -- resource activity
ON a.USERID = r.USERID

LEFT OUTER JOIN
tempdb..DEX_LOCK t -- table locks
ON a.SQLSESID = t.Session_ID

LEFT OUTER JOIN
DYNAMICS..SY01400 um -- user master
ON a.USERID = um.USERID

Open in new window

0
 
rayluvsAuthor Commented:
Yes, thank you.  I see what you mean.  I opened up GP and went into various GP windows and noticed that the column that change is 'WINTYPE'.  We went into Cards, Reports, Transactions and maintenance and the following is what we observe:

     - GL = -32767
     - Bank = no change
     - SOP = 4
     - RM = no change
     - POP = 100
     - PM = no change
     - INVT = 1
     - PR = no change

Notices that when in windows screen of Cards, Reports, Inquiry and maintenance, there were no change in 'WINTYPE'.

I think this is the closest we gotten to see who is online and also in what module?
0
 
rayluvsAuthor Commented:
We reviewed the script to try to see what user is in what option within GP and the closes is my comment on my previous post (ID: 36524666).

Is it safe to say that this is the closest we are going to get?
0
 
Victoria YudinCommented:
Yes, I think so.  I would just like to mention again that it is better to have all users out of GP when performing tasks like Check Links and Reconcile.
0
 
rayluvsAuthor Commented:
Understood.

Thanx
0
 
rayluvsAuthor Commented:
Thanx
0

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

  • 13
  • 7
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now