/// <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)); }
/// <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()); }
/// <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)); }
/// <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)); }
/// <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)); }
/// <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)); }
/// <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)); }
/// <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)); }
/// <summary> /// To get all related list records based on related List APIName, sortByField, sortOrder, page, perPage and modifiedSince. /// </summary> /// <returns>BulkAPIResponse<ZCRMRecord> 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)); }
/// <summary> /// To download the attachment file. /// </summary> /// <returns>FileAPIResponse class instance</returns> public FileAPIResponse DownloadFile() { return(ZCRMModuleRelation.GetInstance(parentRecord, "Attachments").DownloadAttachment(Id)); }
/// <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)); }
/// <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)); }