/// <summary>The method to update related records</summary> /// <param name="recordId">long?</param> /// <param name="request">Instance of BodyWrapper</param> /// <returns>Instance of APIResponse<ActionHandler></returns> public APIResponse <ActionHandler> UpdateRelatedRecords(long?recordId, BodyWrapper request) { CommonAPIHandler handlerInstance = new CommonAPIHandler(); string apiPath = ""; apiPath = string.Concat(apiPath, "/crm/v2.1/"); apiPath = string.Concat(apiPath, this.moduleAPIName.ToString()); apiPath = string.Concat(apiPath, "/"); apiPath = string.Concat(apiPath, recordId.ToString()); apiPath = string.Concat(apiPath, "/"); apiPath = string.Concat(apiPath, this.relatedListAPIName.ToString()); handlerInstance.APIPath = apiPath; handlerInstance.HttpMethod = Constants.REQUEST_METHOD_PUT; handlerInstance.CategoryMethod = Constants.REQUEST_CATEGORY_UPDATE; handlerInstance.ContentType = "application/json"; handlerInstance.Request = request; handlerInstance.AddHeader(new Header <string>("X-EXTERNAL", "com.zoho.crm.api.RelatedRecords.UpdateRelatedRecordsHeader"), this.xExternal); Utility.GetRelatedLists(this.relatedListAPIName, this.moduleAPIName, handlerInstance); return(handlerInstance.APICall <ActionHandler>(typeof(ActionHandler), "application/json")); }
/// <summary>The method to update related record</summary> /// <param name="relatedRecordId">long?</param> /// <param name="request">Instance of BodyWrapper</param> /// <param name="headerInstance">Instance of HeaderMap</param> /// <returns>Instance of APIResponse<ActionHandler></returns> public APIResponse<ActionHandler> UpdateRelatedRecord(long? relatedRecordId, BodyWrapper request, HeaderMap headerInstance) { CommonAPIHandler handlerInstance=new CommonAPIHandler(); string apiPath=""; apiPath=string.Concat(apiPath, "/crm/v2/"); apiPath=string.Concat(apiPath, this.moduleAPIName.ToString()); apiPath=string.Concat(apiPath, "/"); apiPath=string.Concat(apiPath, this.recordId.ToString()); apiPath=string.Concat(apiPath, "/"); apiPath=string.Concat(apiPath, this.relatedListAPIName.ToString()); apiPath=string.Concat(apiPath, "/"); apiPath=string.Concat(apiPath, relatedRecordId.ToString()); handlerInstance.APIPath=apiPath; handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PUT; handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_UPDATE; handlerInstance.ContentType="application/json"; handlerInstance.Request=request; handlerInstance.Header=headerInstance; Utility.GetRelatedLists( this.relatedListAPIName, this.moduleAPIName, handlerInstance); return handlerInstance.APICall<ActionHandler>(typeof(ActionHandler), "application/json"); }