DexDefaultsWrite()

The DexDefaultsWrite() function writes a setting to the Microsoft Dynamics GP defaults file (Dex.ini).

Syntax

DexDefaultsWrite(setting, value, target)

Parameters

setting - A string indicating the setting in the file you want to write to. If setting doesn't exist, one is created.

value - A string specifying a value for setting.

target - An integer parameter that applies when the per-user defaults file is enabled. The following values can be 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.

If the per-user defaults file is not enabled, the setting will be written to the global DEX.INI file found in the Data folder of the application.

Return value

The boolean value true.

Examples

The following C# example writes the value from a text box to the "SampleSetting" value of the global Dex.ini file.

Dynamics.Forms.SyVisualStudioHelper.Functions.DexDefaultsWrite.Invoke(
    "SampleSetting", INIValue.Text.ToString(), 2);

The following Visual Basic example writes the value from a text box to the "SampleSetting" value of the global Dex.ini file.

Dynamics.Forms.SyVisualStudioHelper.Functions.DexDefaultsWrite _
.Invoke("SampleSetting", INIValue.Text.ToString(), 2)