SysAutoRun.execUserOptions Method [AX 2012]

Enables or disables basic user options.

Syntax

protected boolean execUserOptions(XmlNode _command)

Run On

Client

Parameters

  • _command
    Type: XmlNode Class
    The XML node to get the value from.

Return Value

Type: boolean
true if execution is successful; otherwise, false.

Remarks

These options are the same as those available on the Confirmation tab of the Tools > Options form. It is possible to specify another user to copy the settings from.

The execUserOptions method is called when the <UserOptions> tag is used in the configuration file when Microsoft Dynamics AX is started. For more information, see the SysAutoRun class.

Execution of this method is controlled by the SysAutoRun.execCommand method.

The <UserOptions> tag has the following attributes:

  • userId, the user for whom settings should be updated

  • copyFromUserId, the user from whom settings should be copied

Each <UserOptions> tag contains one or more <UserOption> tags. They are used to update individual options. The <UserOption> tag has two attributes:

  • name, the name of the option.

  • enabled, determines whether the option is enabled.

Examples

The following example copies the settings for the Admin user into the user option settings for John, the user. Some of these setting are then overridden.

<UserOptions userId="John" copyFromUserId="Admin"> 
 <UserOption name="DeleteMain" enabled="false" /> 
 <UserOption name="UpdateMain" enabled="true" /> 
 <UserOption name="DeleteMiscellaneous" enabled="false" /> 
 <UserOption name="UpdateMiscellaneous" enabled="false" /> 
 <UserOption name="DeleteParameter" enabled="false" /> 
 <UserOption name="UpdateParameter" enabled="false" /> 
 <UserOption name="DeleteGroup" enabled="false" /> 
 <UserOption name="UpdateGroup" enabled="false" /> 
 <UserOption name="DeleteTransaction" enabled="false" /> 
 <UserOption name="UpdateTransaction" enabled="false" /> 
 <UserOption name="DeleteWorksheetHeader" enabled="false" /> 
 <UserOption name="UpdateWorksheetHeader" enabled="false" /> 
 <UserOption name="DeleteWorksheetLine" enabled="false" /> 
 <UserOption name="UpdateWorksheetLine" enabled="false" /> 
</UserOptions>

See Also

Reference

SysAutoRun Class