How to Test Date Driven Features in GP
I have added a new file to the .ini collection – the Keys.iniThis information comes compliments of Alice Newsman from the GP Test Team. Alice explains how to use the file, where to put it and why you NEED to use this file when testing date driven features http://blogs.msdn.com/b/developingfordynamicsgp/archive/2009/12/18/testing-date-driven-features-in-gp.aspx
Download the new file here: http://www.4shared.com/document/Dn7XeHVj/KEYSini_file_settings.html
Dex.ini Settings
Several settings in the Dex.ini file control the application and enable more consistency to be driven into tests. The below settings will allow you to specify whether you want to use the Control Panel settings for date, time and currency values as well as allowing you to set the preferred format.
StdInternationalInfo
This setting allows the operating system settings for date, time, and currency formatting to be overridden.
TRUE = Use Dexterity standard formats for date, time, and currency values
FALSE = Use control panel settings for date, time, and currency values
StdInternationalInfoDateCentury
This setting allows control over the year portion of the date values used by StdInternationalInfo
TRUE = Four digits will be used for the year portion of date values
FALSE = Two digits will be used for the year portion of date values
StdInternationalInfoDateZeroPrefix
This setting allows control over the date format for SdtInternationalInfo
TRUE = Single-digit day and month values will be prefixed with a 0 (zero)
FALSE = Single-digit day and month values will not be prefixed
Keys.ini Settings
The Keys.ini file contains commands that are run at startup to configure various system behaviors. The commands in the Keys.ini are run only if the file is included in the command to launch Microsoft Dynamics GP.
You create this file using a text editor such as Notepad. The Keys.ini file is typically stored in the Data folder of the Microsoft Dynamics GP installation.
To work properly, the Keys.ini file must also have a blank line as the last item in the file. The following commands allow the user to set a static system date and time.
SetEbDateTo
This command specifies the date value to use for the system date. Note that for this setting the '=' is not included in the switch, it is here just for definition readability. Examples are included to clarify.
'o/s' = Use the operating system date
MM/DD/YY/DOW = Use the date specified, where MM is the month, DD is the date, YY is the year, and DOW is the day of the week
Example: SetEbDateTo date 01/01/1965
SetEbTimeTo
This command specifies the time value to use for the system time. Note that for this setting the '=' is not included in the switch, it is here just for definition readability. Examples are included to clarify.
'o/s' = Use the operating system time
time HH:MM:SS = Use the time specified, where HH is the hour (from 0 to 23), MM is the minute, and SS is the second
Example: SetEbTimeTo time 4:15:00
Here is an example of how the switches would look in the Keys.ini file
SetEbDateTo date 01/01/2001
SetEbTimeTo 'o/s'
Once the above settings have been specified you will then be able to setup your starting data including specific dates for orders, items, etc to create in-depth testing for date driven features.
Enjoy!
Leslie Vail
2 comments:
hello,
I have a question in G.P. I am trying to attach a .pdf file to the ole container but it comes up with cannot add object.it does add all other files such as word pitures etc... could you please help me with this?
Thanks
esterdid,
I have no problem attaching .pdf files to OLE. Are you linking or embedding? Are you browsing for your file or trying to create it in the OLE Container. Do you own the full version of Adobe?
Leslie
Post a Comment