DocumentItemTryGetFieldDataT Method | |
Attempts to get the field data from the document matching the type param.
If the field data is not set, false is returned, and fieldData is set to default(T).
If the field has data, and matches the type, true is returned, with fieldData set to the value.
Namespace:
Compiled.EDD.Scripting
Assembly:
Compiled.EDD.Scripting (in Compiled.EDD.Scripting.dll) Version: 7.6.1.3-5cb5c356
Syntax public bool TryGetFieldData<T>(
FieldItem field,
out T fieldData
)
Parameters
- field
- Type: Compiled.EDD.ScriptingFieldItem
The field to retrieve a value for. - fieldData
- Type: T
The field value matching the type param.
Type Parameters
- T
- Only string, int, float, DateTime or bool should be specified here.
Return Value
Type:
Booleantrue if value retrieved matching type successfully; otherwise
false.
Exceptions Exception | Condition |
---|
ArgumentNullException | Thrown if field param is null. |
See Also