Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User Date after Logon 1

Status
Not open for further replies.

tb

Programmer
May 27, 2003
328
Hi everyone,

If this is not the correct forum .. I do appologise in advance...

I need to obtain the User date from Great Plains - this is for 3rd party development through VB. Is this date stored anywhere? In a SYxxx table or is it part of Great Plains global variables?

Any ideas would be much appreciated.
[flowerface]

I was standing in the park, wondering why frisbees got bigger as they came closer... then it hit me!
 
The activity table under the dynamics database will give you the current log ins with their login dates.
 
Hi, thanks for your response.

The activity table shows the system date of the login. If the user changes the date on the User date screen, this does not reflect in the activity table.

I need to be able to access the date the user selected in the User date screen ... ie if the system date is 2004/05/18 and the user changes this in the User date screen to 2004/05/20 ... I need to access the 20th of May and not the 18th - which is in the activity table - because this will be used in all postings (it overrides the system date)

I do appologise if I did not clarify this in my post.

Any ideas?
Thanks
[flowerface]

I was standing in the park, wondering why frisbees got bigger as they came closer... then it hit me!
 
I have run into this question before and the answer that was given to me was that Great Plains does not have a table specific to User Date. It somehow integrates with the system date and time.
 
Soooo ... basically I'm stuck.

As it does not get stored in the database it just keeps it in memory for as long as the session is open ie while the user is running the application.

I have tried referencing the dynamics object through code, but did not succeed in getting the date. I will give it another go and if I have any luck I will let you know.

Thanks again ...

I was standing in the park, wondering why frisbees got bigger as they came closer... then it hit me!
 
Let me know if you figure it out because I would become a hero to my boss, he needed this option also.
 
I ran into a similar problem (where a machine that is logged in 24x7 on our manufacturing floor) had the little pop up saying 'it is midnight - do you want to change the date?'... and the guys were just closing the window.

My problem was that I would see todays date (example in the SOP module) in the MODIFDT field and yesterdays date in DOCDATE field (which is what the user date is stored as in SOP) --- so I wrote a process which would look for the discrepencies and only report problems to an administrative user when this manufcaturing user had done something like this.

and yes --- it is local to the box which is a p.i.t.a.
 
What kind of process did you create, was it a stored procedure, vb script or just plain sql query statement?

Would appreciate if you can pm the code to me. Thanks.
 
mine was a trigger (sorry - away from HQ right now) that would check the dates and insert the report information into another table (since GP did not like me doing a RAISERROR in the middle of their insert). I can guess at what is in the trigger, but when I get home I will look at this again and pull out the code..

if memory serves it was a simple insert of the SOPnumber & SOPtype when the dates did not match and it was one of two users (since other users would update it later during invoicing).

I also threatend the plant floor folks with extreme pain if they did not start clicking YES on the stupid screen.
 
Why don't you read the date from the Toolbar window?

Or use Continuum's pass through sanscript capabilities to read the 'User Date' of globals.

These methods work with VBA, so I would assume they would work with VB as well.

David Musgrave
Senior Development Consultant
MBS Services - Asia Pacific

Microsoft Business Solutions

mailto:dmusgrav@nospam-microsoft.com

Any views contained within are my personal views and
not necessarily Microsoft Business Solutions policy.
 
Hi Dave,

Can you be a bit more specific as I am a "neewbie" to this topic. How do I referenece the toolbar to be able to read the properties.

Dim objGP As Dynamics.Application
Dim objToolbar As DUOSObject (???)

Tried a search on "ExecuteSanscript", but found that I do not have the Continuuum.hlp :-(

To get me started could you perhaps supply me with a VBA code example (would be very much appreciated)... or even just a reference to a help file.

Regards,
Esmé


I was standing in the park, wondering why frisbees got bigger as they came closer... then it hit me!
 
Esmé

You can just add the Toolbar window and User Date field on the toolbar window to VBA and then you can reference them. This is standard VBA functionality from within Great Plains. Look at the Tools >> Customisation menu (assuming you are registered for Modifier & VBA).

Email me directly and I can send you a VBA example which has use of RetrieveGlobals to open an ADO connection to SQL and also use of pass through SanScript.

Please note that pass through SanScript is not officially supported.

David Musgrave
Senior Development Consultant
MBS Services - Asia Pacific

Microsoft Business Solutions

mailto:dmusgrav@nospam-microsoft.com

Any views contained within are my personal views and
not necessarily Microsoft Business Solutions policy.
 
Email on the way ...
[flowerface]

Thanks

I was standing in the park, wondering why frisbees got bigger as they came closer... then it hit me!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top