| DataObjectControllerGetSinglePropertyValueByOdwMappingT Method |
Returns a single value for a property or a fixed field on a data object based on ODW mapping.
Not all fixed fields are supported - please refer to the PropertyValuesContainer class for details.
The security model is respected.
Throws an exception if the data object doesn't exist or security prevents access to it.
Namespace:
Omada.OE.AppLogic
Assembly:
Omada.OE.AppLogic (in Omada.OE.AppLogic.dll) Version: 15.0.0.0
Syntaxpublic virtual T GetSinglePropertyValueByOdwMapping<T>(
int dataObjectId,
string odwMappingName,
T defaultValue
)
where T : Object, IEquatable<T>
Parameters
- dataObjectId
- Type: SystemInt32
Id of the data object from which the value should be returned.
- odwMappingName
- Type: SystemString
System name of a property or name of a fixed field.
Can also be a property id on the format: "ID:[property id]".
Not all fixed fields are supported - please refer to the PropertyValuesContainer class for details.
- defaultValue
- Type: T
If the property/field doesn't exist or the data object has no value for it then defaultValue is returned.
Type Parameters
- T
-
The data type of the value depends on the property type and data type:
Value property - Text: string
Value property - Integer: int
Value property - DateTime: DateTime
Value property - Decimal: double
Value property - Boolean: bool
Value property - Hyperlink: string
Value property - TimeSpan: TimeSpan
Value property - MultiLangText: string
Value property - Xml: string
Set property: int
Reference property: int
Fixed fields: (other are supported besides these - please refer to the PropertyValuesContainer class for details)
CreateTime: DateTime
ChangeTime: DateTime
CreatedBy: int
Number: int
Type: int
Id: int
DisplayName: string
Return Value
Type:
T
Returns a single value for the property or fixed field.
If the property/field doesn't exist or the data object has no value for it then defaultValue is returned.
See Also