Search in zoho desk with criteria

PHOTO EMBED

Thu Jul 11 2024 12:08:24 GMT+0000 (Coordinated Universal Time)

Saved by @RehmatAli2024 #deluge

	time_and_zone = reset_date_time.getSuffix("T");
	reset_date = reset_date_time.getPrefix("T");
// 	info time_and_zone;
	//////// calculating time /////
	if(frequency == "Weekly")
	{
	 	next = reset_date.addDay(7);
	}else if (frequency == "Monthly")
	{
		nex = reset_date.addMonth(1);
	}else if (frequency == "Quarterly") 
    {
		next = reset_date.addMonth(3);
    }
	else if ( frequency == "Yearly" ) 
    {
		next = reset_date.addYear(1);
    }
	
	end_date_time = nex.toString("yyyy-MM-dd")+"T"+time_and_zone;
// iteration_list = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]
searchValue = {"contactId":contact_Id, "createdTimeRange":reset_date_time +","+end_date_time }; 
response = zoho.desk.searchRecords(organization_id, "tickets", searchValue, 0, 1000, "zoho_desk");
content_copyCOPY