Solved

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

Posted on 2011-09-11
23
1,126 Views
Last Modified: 2012-05-12
Is there a way to know where a user is in GP either by SQL, VB.NET or by Retreiveglobal?

0
Comment
Question by:rayluvs
  • 13
  • 7
  • 3
23 Comments
 
LVL 10

Expert Comment

by:Abdulmalek_Hamsho
ID: 36519848
What do you mean by "Where"?
0
 

Author Comment

by:rayluvs
ID: 36519918
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
 
LVL 10

Accepted Solution

by:
Abdulmalek_Hamsho earned 287 total points
ID: 36520085
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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

Author Comment

by:rayluvs
ID: 36520179
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
 
LVL 10

Assisted Solution

by:Abdulmalek_Hamsho
Abdulmalek_Hamsho earned 287 total points
ID: 36520290
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
 

Author Comment

by:rayluvs
ID: 36520345
Will try it.... but is Audit Trail online; that is, not dependen to historical?
0
 
LVL 10

Assisted Solution

by:Abdulmalek_Hamsho
Abdulmalek_Hamsho earned 287 total points
ID: 36520362
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
 

Author Comment

by:rayluvs
ID: 36520677
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
 
LVL 10

Expert Comment

by:Abdulmalek_Hamsho
ID: 36521687
Why would one need to know what window every user is working on?

RetrieveGlobals has nothing to do with your requirement.
0
 

Author Comment

by:rayluvs
ID: 36522709
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
 

Author Comment

by:rayluvs
ID: 36522724
I guess, to rephrase the question:  "How to determine what module or series a user is logged in"
0
 
LVL 10

Expert Comment

by:Abdulmalek_Hamsho
ID: 36523080
Yes, this is exactly what SY00800 does. Check Links and Reconciliation check SY00800 to see if any related Batch or Transaction is locked.
0
 
LVL 18

Assisted Solution

by:Victoria Yudin
Victoria Yudin earned 213 total points
ID: 36523177
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
 
LVL 10

Assisted Solution

by:Abdulmalek_Hamsho
Abdulmalek_Hamsho earned 287 total points
ID: 36523258
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
 

Author Comment

by:rayluvs
ID: 36523429
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
 

Author Comment

by:rayluvs
ID: 36523449
Hi victoria_y, didn't see your post; we'll check your links
0
 

Author Comment

by:rayluvs
ID: 36523685
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
 
LVL 18

Assisted Solution

by:Victoria Yudin
Victoria Yudin earned 213 total points
ID: 36524405
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
 

Author Comment

by:rayluvs
ID: 36524666
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
 

Author Comment

by:rayluvs
ID: 36558079
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
 
LVL 18

Assisted Solution

by:Victoria Yudin
Victoria Yudin earned 213 total points
ID: 36559934
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
 

Author Comment

by:rayluvs
ID: 36560086
Understood.

Thanx
0
 

Author Closing Comment

by:rayluvs
ID: 36560097
Thanx
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

On Sep 22nd 2014 Microsoft released Update Rollup 1 for Microsoft Dynamics CRM 2013 Service Pack 1 and back in July Update Rollup 3 was released.  So we now have:   Update Rollup 1Update Rollup 2Update Rollup 3Service Pack 1Update Rollup 1 for S…
Automatically creating a Trello card using data from a Microsoft Dynamics CRM record turned out to be an easy project that yielded great results.  Here's how I did this for an internal team at General Code.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question