Condividi tramite


DefaultValue Element in DefaultValues (BDCMetadata Schema)

Applies to: SharePoint Server 2010

Represents a default value.

Some methods have complex signatures. For example, the Web service to get CRM customers might take six parameters, three of which might be structures with subparameters. To make it easier for users to call these methods, BDC allows you to specify default values for the parameters in the metadata. This way, users can invoke predefined business logic without having to undertake parameter construction.

The user can override any input parameter for which you have defined a DefaultValue. The user must specify any input parameter that has no DefaultValue, if the parameter is not optional.

For each abstract primitive in a TypeDescriptor object, you can define multiple default values, each of which corresponds to a particular MethodInstance object. At run-time, depending on which MethodInstance object the client executes, a parameter will be instantiated based on the corresponding default values.

Namespace: https://schemas.microsoft.com/windows/2007/BusinessDataCatalog

Schema: BDCMetadata

<DefaultValue MethodInstanceName = "String" Type = "String"> </DefaultValue>

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute

Description

MethodInstanceName

Required.

The name of the MethodInstance to which this DefaultValue applies.

Attribute type: String

Type

Required.

The data type of the default value.

The following are the acceptable values for this attribute.

  • System.Int16

  • System.Int32

  • System.Int64

  • System.Single

  • System.Double

  • System.Decimal

  • System.Boolean

  • System.Byte

  • System.UInt16

  • System.UInt32

  • System.UInt64

  • System.Guid

  • System.String

  • System.DateTime

  • Any other serializable type (such as where Type.IsSerializable == true)

Attribute type: String

Child Elements

None.

Parent Elements

Element

Description

DefaultValues Element in TypeDescriptor (BDCMetadata Schema)