ZCRMModule moduleIns = ZCRMModule.GetInstance("contacts"); //module api name
List<string> fields = new List<string> { "Last_Name", "Company", "Email", "id" }; //field api name
BulkAPIResponse<ZCRMRecord> response1 = moduleIns.GetRecords();// get Records with cvId, sortByField, sortOrder, startIndex, endIndex and fieldApiNamelist.
List<ZCRMRecord> records = response1.BulkData; //records - list of ZCRMRecord instance
List<ZCRMRecord> listRecord = new List<ZCRMRecord>();
ZCRMRecord record;
record = new ZCRMRecord("contacts"); //To get ZCRMRecord instance
record = records[0]; //Tried by commenting this line and passing more parameter values by using setFieldValue.
record.SetFieldValue("Last_Name", "User");
record.SetFieldValue("First_Name", "Lead_First_Name_updated");
listRecord.Add(record);
BulkAPIResponse<ZCRMRecord> responseIns = moduleIns.UpdateRecords(listRecord); //To call the Update record method
May I now how to get the ID for the contact?
Used the below snippet to get all the contacts data and attachment consists of the response. Didnt find any field with ID as property. Kindly please guide me.
BulkAPIResponse<ZCRMRecord> responseAllContacts = moduleIns.GetRecords();// get Records with cvId, sortByField, sortOrder, startIndex, endIndex and fieldApiNamelist.
List<ZCRMRecord> recordAllContacts = responseAllContacts.BulkData; //records - list of ZCRMRecord instance
output = JsonConvert.SerializeObject(recordAllContacts);
I am sturck at the above error while updating the Contact.