Documentation

Processing Options Details

Version 1.2   |   Last Updated: 1/28/2014 (v1.2)   |  

General Get Options

The options described below can be set on the ZohoCRMClient object, or can be set (and overridden) on individual get calls via the CRMGetRecordOptions options parameter.

IncludeNullFields
Set to true in order to include fields with "null" values while fetching data from the Zoho CRM.
RawFieldsOption
Specifies options for loading data to the RawFields dictionary of a model object implementing ISyncableModel. The following options are available (default is StoreUnmatched):
StoreUnmatched
Load only Zoho fields that were not matched to a model property (whether through specified field mappings or automated matching logic).
StoreUnmapped
Load Zoho fields that were not mapped to a model property through the specific field mappings (may have been matched through the automated matching logic). Will not load Zoho special fields that were matched.
StoreAll
Load all Zoho fields whether or not they were matched to a model property.
StoreNone
Do not load any Zoho fields.

General Post Options

The options described below can be set on the ZohoCRMClient object, or can be set (and overridden) on individual post (insert or update) calls via the CRMPostRecordOptions options parameter.

PostModelSyncOption
Specifies the default sync option for models being posted. The following options are available (default is PostResultsOnly):
None
The model object is not updated in any manner following the post operation.
PostResultsOnly
The field values returned with the post response (Id, CreatedTime, ModifiedTime, CreatedBy and ModifiedBy) will be used to updated the corresponding property values on the model object(s) for which the update/insert was performed. These model properties are considered special properties and are identifiable via a set of attributes (see the Special Model Properties section).
FullSync
The actions defined by PostResultsOnly will be performed and all model property values will be confirmed by performing one or more secondary get requests for the model record(s) and comparing each property value. This is not applicable to model objects not implementing ISyncableModel - if this option is specified for models not implementing ISyncableModel an exception will be thrown.
ValidateBeforePost
When true, the model object(s) will be validated before posting is attempted as long as the model implements IValidatableModel (see the Model Validation section). If validation fails, an exception will be thrown. Default is true.
ModelPropertiesSerializationOption
Specifies options when serializing model objects for posting (inserting or updating). The following options are available (default is SerializeMappedOnly):
SerializeMappedOnly
Serializes only the properties (not marked with ignore attributes) that were mapped to Zoho fields through specific field mappings (see the Field Mappings section).
SerializeAllMatched
Serializes all properties (not marked with ignore attributes) that were matched to Zoho fields (whether through specified field mappings or automated matching logic). This is not applicable to model objects not implementing ISyncableModel – this would then default to SerializeMappedOnly. This option causes the library to use the RawFields dictionary of the ISyncableModel object to derive the Zoho field names. However, for this to make any sense, the RawFields dictionary of the model object must have been populated via a previous fetch from Zoho in which the RawFieldsOption was set to StoreUnmapped or StoreAll.
SerializeAll
Serializes all properties (not marked with ignore attributes) of the model objects. All matching logic described above will be used. Properties that were not matched to Zoho fields will use the property name.
SerializePascalCaseAsSpaced
Provides the option to convert all unmapped model properties in Pascal Case format to a spaced format when serializing model objects for posting. This only applies to properties that are not mapped through the SerializeMappedOnly or SerializeAllMatched options of the ModelPropertiesSerializationOption - in other words, the SerializeAll option must be specified. If not all unmapped property names should be serialized using this approach, then the WebSyncSeparatePascalCaseAttribute can be used on just those properties requiring the Pascal Case to spaced conversion. Also note that this does not apply to special fields - if this behavior is desired for special fields, then the WebSyncSeparatePascalCaseAttribute must be applied to the property. Default is false.
SerializeRawFields
Provides the option to serialize the raw field values from the RawFields dictionary when posting a model object that implements ISyncableModel. This option only serializes those fields from the RawFields dictionary that are not represented as properties. Default is false.

Additionally, the following options are set only for individual post (insert or update) calls via the CRMPostRecordOptions options parameter.

PropertiesToInclude
Specifies an array of PropertyInfo objects (that can be generated via lambda expressions through the Model<T>.Properties static method) representing the local model properties to include when posting to the Zoho API. If this option is used, it will override the default property selection logic used by the library.
PropertiesToExclude
Specifies an array of PropertyInfo objects (that can be generated via lambda expressions through the Model<T>.Properties static method) representing the local model properties to exclude when posting to the Zoho API. The default property selection logic used by the library will first be applied, then any properties present that are specified in this exclusion list will be removed.
PostNullFields
Provides the option to either include all null or empty field values when posting data to the Zoho CRM or to exclude them. For inserts, this option will override the PostNullFieldsOnInsert option of the ZohoCRMClient object.