Example #1
0
 /// <summary>
 /// To delete the records based on List of entity(record) Ids of the module.
 /// </summary>
 /// <returns>BulkAPIResponse&lt;ZCRMEntity&gt; class instance.</returns>
 /// <param name="entityIds">List of entity(record) Ids (Long)</param>
 public BulkAPIResponse <ZCRMEntity> DeleteRecords(List <long> entityIds)
 {
     if (entityIds == null || entityIds.Count == 0)
     {
         throw new ZCRMException("Entity ID list MUST NOT be null/empty for delete operation");
     }
     return(MassEntityAPIHandler.GetInstance(this).DeleteRecords(entityIds));
 }
Example #2
0
 /// <summary>
 /// To upsert the records of the module based on List of ZCRMRecord class instance.
 /// </summary>
 /// <returns>BulkAPIResponse&lt;ZCRMRecord&gt; class instance.</returns>
 /// <param name="records">List of ZCRMRecord class instance.</param>
 public BulkAPIResponse <ZCRMRecord> UpsertRecords(List <ZCRMRecord> records)
 {
     if (records == null || records.Count == 0)
     {
         throw new ZCRMException("Record ID list MUST NOT be null/empty for upsert operation");
     }
     return(MassEntityAPIHandler.GetInstance(this).UpsertRecords(records));
 }
Example #3
0
 /// <summary>
 /// To update the records based on List of record Id's, particular field API name and value of the module.
 /// </summary>
 /// <returns>BulkAPIResponse&lt;ZCRMRecord&gt; class instance.</returns>
 /// <param name="entityIds">List of entity(record) Ids (Long) of the module</param>
 /// <param name="fieldAPIName">Field API name (String) of the module</param>
 /// <param name="value">Field value (Object)</param>
 public BulkAPIResponse <ZCRMRecord> MassUpdateRecords(List <long> entityIds, string fieldAPIName, object value)
 {
     if (entityIds == null || entityIds.Count == 0)
     {
         throw new ZCRMException("Entity ID list MUST NOT be null/empty for update operation");
     }
     return(MassEntityAPIHandler.GetInstance(this).MassUpdateRecords(entityIds, fieldAPIName, value));
 }
Example #4
0
 /// <summary>
 /// To create records of the module based on ZCRMRecord class instance.
 /// </summary>
 /// <returns>BulkAPIResponse&lt;ZCRMRecord&gt; class instance.</returns>
 /// <param name="records">List of ZCRMRecord class instances</param>
 public BulkAPIResponse <ZCRMRecord> CreateRecords(List <ZCRMRecord> records)
 {
     if (records == null || records.Count == 0)
     {
         throw new ZCRMException(" Records list MUST NOT be null for Create operation");
     }
     return(MassEntityAPIHandler.GetInstance(this).CreateRecords(records));
 }
Example #5
0
 /// <summary>
 /// To get all records of the module based on custom view Id, sortByField, sortOrder, page, perPage, modifiedSince(Header) and selected fields information.
 /// </summary>
 /// <returns>BulkAPIResponse&lt;ZCRMRecord&gt; class instance.</returns>
 /// <param name="cvId">Custom view Id (Long) of the module. Records only from the given custom view will be fetched</param>
 /// <param name="sortByField">To sort the records based on this field (String)</param>
 /// <param name="sortOrder">Order preference - CommonUtil.SortOrder {asc/desc} <example>CommonUtil.SortOrder.asc</example></param>
 /// <param name="page">Starting page index (Integer)</param>
 /// <param name="perPage">Number of records per page (Integer)</param>
 /// <param name="modifiedSince">DateTime(ISO8601 format) to display records which are modified after the given input datetime (String)</param>
 /// <param name="fields">List of field API names (String)</param>
 public BulkAPIResponse <ZCRMRecord> GetRecords(long?cvId,
                                                string sortByField,
                                                CommonUtil.SortOrder?sortOrder,
                                                int page,
                                                int perPage,
                                                string modifiedSince,
                                                List <string> fields)
 {
     return(MassEntityAPIHandler.GetInstance(this).GetRecords(cvId, sortByField, sortOrder, page, perPage, modifiedSince, null, null, fields));
 }
Example #6
0
 /// <summary>
 /// To search the record based on email with page and perPage.
 /// </summary>
 /// <returns>BulkAPIResponse&lt;ZCRMRecord&gt; class instance.</returns>
 /// <param name="value">Search email id (String). This will return the record details based on email id.</param>
 /// <param name="page">Starting page index (Integer)</param>
 /// <param name="perPage">Number of records per page (Integer)</param>
 public BulkAPIResponse <ZCRMRecord> SearchByEmail(string value, int page, int perPage)
 {
     return(MassEntityAPIHandler.GetInstance(this).SearchByEmail(value, page, perPage));
 }
Example #7
0
 /// <summary>
 /// To search the record based on phone.
 /// </summary>
 /// <returns>BulkAPIResponse&lt;ZCRMRecord&gt; class instance.</returns>
 /// <param name="value">Search phone number (String). This will return the record details based on phone number.</param>
 public BulkAPIResponse <ZCRMRecord> SearchByPhone(string value)
 {
     return(MassEntityAPIHandler.GetInstance(this).SearchByPhone(value, 1, 200));
 }
Example #8
0
 /// <summary>
 /// To get permanently deleted records of the module.
 /// </summary>
 /// <returns>BulkAPIResponse&lt;ZCRMTrashRecord&gt; class instance.</returns>
 public BulkAPIResponse <ZCRMTrashRecord> GetPermanentlyDeletedRecords()
 {
     return(MassEntityAPIHandler.GetInstance(this).GetPermanentlyDeletedRecords());
 }
Example #9
0
 /// <summary>
 /// To get recycle bin records of the module.
 /// </summary>
 /// <returns>BulkAPIResponse&lt;ZCRMTrashRecord&gt; class instance.</returns>
 public BulkAPIResponse <ZCRMTrashRecord> GetRecycleBinRecords()
 {
     return(MassEntityAPIHandler.GetInstance(this).GetRecycleBinRecords());
 }