示例#1
0
 /// <summary>
 /// To deletes the note of the records.
 /// </summary>
 /// <returns>APIResponse class instance.</returns>
 /// <param name="note">ZCRMNote class instance</param>
 public APIResponse DeleteNote(ZCRMNote note)
 {
     if (note.Id == null)
     {
         throw new ZCRMException("Note ID MUST be null for Delete Operation");
     }
     return(ZCRMModuleRelation.GetInstance(this, "Notes").DeleteNote(note));
 }
示例#2
0
 /// <summary>
 /// To delete the relation of the record based on ZCRMJunctionRecord class instance.
 /// </summary>
 /// <returns>APIResponse class instance.</returns>
 /// <param name="junctionRecord">ZCRMJunctionRecord class instance</param>
 public APIResponse DeleteRelation(ZCRMJunctionRecord junctionRecord)
 {
     return(ZCRMModuleRelation.GetInstance(this, junctionRecord).DeleteRelation());
 }
示例#3
0
 /// <summary>
 /// To delete the attachment of the records based on attachment Id.
 /// </summary>
 /// <returns>APIResponse class instance.</returns>
 /// <param name="attachmentId">Id (Long) of the record attachment.</param>
 public APIResponse DeleteAttachment(long attachmentId)
 {
     return(ZCRMModuleRelation.GetInstance(this, "Attachments").DeleteAttachment(attachmentId));
 }
示例#4
0
 /// <summary>
 /// To download the attachment of the records based on attachment Id.
 /// </summary>
 /// <returns>FileAPIResponse class instance.</returns>
 /// <param name="attachmentId">Id (Long) of the record attachment.</param>
 public FileAPIResponse DownloadAttachment(long attachmentId)
 {
     return(ZCRMModuleRelation.GetInstance(this, "Attachments").DownloadAttachment(attachmentId));
 }
示例#5
0
 /// <summary>
 /// To upload the link as attachment of the records based on attachment URL.
 /// </summary>
 /// <returns>APIResponse class instance.</returns>
 /// <param name="attachmentUrl">Attachment URL (String) of the record</param>
 public APIResponse UploadLinkAsAttachment(String attachmentUrl)
 {
     return(ZCRMModuleRelation.GetInstance(this, "Attachments").UploadLinkAsAttachment(attachmentUrl));
 }
示例#6
0
 /// <summary>
 /// To upload the attachment of the records based on attachment file path.
 /// </summary>
 /// <returns>APIResponse class instance.</returns>
 /// <param name="filePath">file path (String) of the record attachment.</param>
 public APIResponse UploadAttachment(String filePath)
 {
     return(ZCRMModuleRelation.GetInstance(this, "Attachments").UploadAttachment(filePath));
 }
示例#7
0
 /// <summary>
 /// To get all attachments of the records based on page, perPage and modifiedSince(Header).
 /// </summary>
 /// <returns>BulkAPIResponse class instance.</returns>
 /// <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 attachments which are modified after the given input datetime (String)</param>
 public BulkAPIResponse <ZCRMAttachment> GetAttachments(int page, int perPage, string modifiedSince)
 {
     return(ZCRMModuleRelation.GetInstance(this, "Attachments").GetAttachments(page, perPage, modifiedSince));
 }
示例#8
0
 /// <summary>
 /// To get all notes of the records based on sortByField, sortOrder, page, perPage and modifiedSince(Header).
 /// </summary>
 /// <returns>BulkAPIResponse class instance.</returns>
 /// <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 notes which are modified after the given input datetime (String)</param>
 public BulkAPIResponse <ZCRMNote> GetNotes(string sortByField, CommonUtil.SortOrder?sortOrder, int page, int perPage, string modifiedSince)
 {
     return(ZCRMModuleRelation.GetInstance(this, "Notes").GetNotes(sortByField, sortOrder, page, perPage, modifiedSince));
 }
示例#9
0
 /// <summary>
 /// To get all related list records based on related List APIName, sortByField, sortOrder, page, perPage and modifiedSince.
 /// </summary>
 /// <returns>BulkAPIResponse&lt;ZCRMRecord&gt; class instance.</returns>
 /// <param name="relatedListAPIName">APIName (String) of the record related list.</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 to display records which are modified after the given input datetime (String)</param>
 public BulkAPIResponse <ZCRMRecord> GetRelatedListRecords(string relatedListAPIName, string sortByField, CommonUtil.SortOrder?sortOrder, int page, int perPage, string modifiedSince)
 {
     return(ZCRMModuleRelation.GetInstance(this, relatedListAPIName).GetRecords(sortByField, sortOrder, page, perPage, modifiedSince));
 }
示例#10
0
 /// <summary>
 /// To download the attachment file.
 /// </summary>
 /// <returns>FileAPIResponse class instance</returns>
 public FileAPIResponse DownloadFile()
 {
     return(ZCRMModuleRelation.GetInstance(parentRecord, "Attachments").DownloadAttachment(Id));
 }
示例#11
0
 /// <summary>
 /// To delete the attachment of the notes based on attachment Id.
 /// </summary>
 /// <returns>APIResponse class instance.</returns>
 /// <param name="attachmentId">Attachment Id (Long) of the notes</param>
 public APIResponse DeleteAttachment(long attachmentId)
 {
     return(ZCRMModuleRelation.GetInstance(ZCRMRecord.GetInstance("Notes", id), "Attachments").DeleteAttachment(attachmentId));
 }
示例#12
0
 /// <summary>
 /// To upload the attachment of the notes based on file path.
 /// </summary>
 /// <returns>APIResponse class instance.</returns>
 /// <param name="filePath">File path (String) of the note attachment</param>
 public APIResponse UploadAttachment(string filePath)
 {
     return(ZCRMModuleRelation.GetInstance(ZCRMRecord.GetInstance("Notes", id), "Attachments").UploadAttachment(filePath));
 }