DexDefaultsRead()
The DexDefaultsRead() function reads the value of a setting in the Microsoft Dynamics GP defaults file (Dex.ini).
Syntax
DexDefaultsRead(setting, target)
Parameters
• setting - A string specifying the setting to read.
• target - An integer parameter that applies when the per-user defaults file is enabled. The following values are used:
Value |
Description |
---|---|
1 |
Accesses the user-specific DEX.INI file, found in the user's temporary folder. |
2 |
Accesses the global DEX.INI file, found in the Data folder of the application. |
When specifying the target parameter, you can add the values together (1 + 2) to read the value from the user-specific DEX.INI file, and then from the global DEX.INI file.
Return value
A string indicating the value of setting. If the setting doesn't exist, the returned string will be empty.
Examples
The following C# example retrieves the value of the "SampleSetting" value of the Dex.ini file. The user-specific Dex.ini file is examined first, and then the global file is accessed. The value retrieved is displayed in a text box.
RetrievedValue.Text = Dynamics.Forms.SyVisualStudioHelper.Functions. DexDefaultsRead.Invoke("SampleSetting", 1 + 2);
The following Visual Basic example retrieves the value of the "SampleSetting" value of the Dex.ini file. The user-specific Dex.ini file is examined first, and then the global file is accessed. The value retrieved is displayed in a text box.
RetrievedValue.Text = Dynamics.Forms.SyVisualStudioHelper.Functions. _ DexDefaultsRead.Invoke("SampleSetting", 1 + 2)