add Element (under appSettings element)
The <add> element defines a key-value pair for configuring or customizing the instance of a tasklet in the application. A tasklet can be developed to include key-value pairs that you can set in the UserRole.xml file to change its configuration. For example, a tasklet can have a key-value pair that makes the interface read-only, which prevents users from changing information. In the UserRole.xml file, key-value pairs can be defined in the following ways:
-
On a global basis for all instances of a tasklet in the application
-
On an orchestration basis for instances of a tasklet in a specific orchestration
-
Directly on the instance of a tasklet.
add Element (under appSettings element)
add Element (under appSettings element)
add Element (under appSettings element)
add Element (under appSettings element)
<add key="key ID" value="value setting" />
The following sections describe attributes, child elements, and parent elements.
Attributes
| Attribute | Description |
|---|---|
|
key |
Required attribute. The key identifier of the configuration setting. |
|
value |
Required attribute. Specifies the value for the configuration setting that is associated with the key identifier. |
Child Elements
None.
Parent Elements
| Element | Description |
|---|---|
|
Identifies key-value pairs to configure custom settings for tasklets. | |
|
Identifies key-value pairs to change text strings that are displayed in the tasklet user interface. For more information, see add Element (under labels element). |
The following example uses <add> elements to configure a tasklet that displays information about the application. The tasklet has an option that allows the user to send the application information as an e-mail to a designated recipient. The <add> element under the <appSettings> element defines the recipient's e-mail address. The <add> elements under the <labels> element define some of the UI text strings. For more information on labels, see labels Element.
<tasklet name="ShowAbout" text="About Sample Application" type="Microsoft.Dynamics.Mobile.Components.Tasklets.AboutTasklet, Microsoft.Dynamics.Mobile.Framework.Runtime" >
<configuration>
<appSettings>
<add key="DefaultEmailAddress" value="ms@microsoft.com" />
</appSettings>
<labels>
<add key="ColumnCaption_Address" text="Address" context="" />
<add key="ColumnCaption_AgentSet" text="Agentset" context="" />
<add key="TabPage_Agents" text="Agents" context="" />
<add key="ColumnCaption_Application" text="Application" context="" />
<add key="ColumnCaption_Assembly" text="Assembly" context="" />
</labels>
</configuration>
</tasklet>
Tasks
How to: Configure a Tasklet Using appSettingsReference
orchestration Elementtasklet Element
configuration Element
appSettings Element
labels Element
Concepts
UserRole Schema Hierarchy StructureConfiguring Tasklets
Defining Orchestrations in the UserRole
Defining Tasklets
Other Resources
Mobile OrchestrationCustomizing Tasklets
How to: Add appSettings Configurations