Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

tb (Programmer) (OP)
18 May 04 4:45
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.

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

klewis10367 (MIS)
18 May 04 7:41
The activity table under the dynamics database will give you the current log ins with their login dates.
tb (Programmer) (OP)
18 May 04 7:56
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

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

klewis10367 (MIS)
18 May 04 8:07
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.
tb (Programmer) (OP)
18 May 04 8:15
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!

klewis10367 (MIS)
18 May 04 8:19
Let me know if you figure it out because I would become a hero to my boss, he needed this option also.
jymm (Programmer)
18 May 04 11:13
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.
Dukester0122 (IS/IT--Management)
19 May 04 11:33
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.
jymm (Programmer)
19 May 04 13:57
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.
Helpful Member!  winthropdc (Programmer)
19 May 04 21:04
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
http://www.microsoft.com/BusinessSolutions

mailto:dmusgrav@nospam-microsoft.com

Any views contained within are my personal views and
not necessarily Microsoft Business Solutions policy.
tb (Programmer) (OP)
20 May 04 2:35
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!

winthropdc (Programmer)
20 May 04 22:57
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
http://www.microsoft.com/BusinessSolutions

mailto:dmusgrav@nospam-microsoft.com

Any views contained within are my personal views and
not necessarily Microsoft Business Solutions policy.
tb (Programmer) (OP)
21 May 04 3:10
Email on the way ...


Thanks

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

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close