What?
This is an article documenting how to access ZohoCRM with API v2 using PHP and cURL. The first few functions are to manage OAuth v2 and generate the refresh and access tokens. The second snippet of code below is using the functions to read data from Zoho CRM and to write data back to the system.

Why?
I've rewritten this code a few times and want to store the finalized version (following updates) making it as generic as I can in order to apply it to any client.

How?
Firstly, you will need to browse to https://accounts.zoho.eu/developerconsole and register your new app (or the one you will have completed once copying the below scripts).

What?
So I needed to clear space on a workstation's C drive. There are other programs about and even some built-in to MS Windows that could potentially be used.

This is a quick article on how to write an AutoHotkey program to simply return the folders in the drive and display the size of all the files/folders contained within.

How?
So I'll be putting this program for download from the download section of this website but I don't expect anyone to trust an executable EXE so here's the code of what it's doing which you can copy and paste to an AutoHotkey script:

What?
So this is a quick article on how to maintain an aspect ratio when resizing an image.

How?
These are the calculations to work out the new height given the width or the new width given the height:
copyraw
(original height / original width) x new width = new height

(original width / original height) x new height = new width
  1.  (original height / original width) x new width = new height 
  2.   
  3.  (original width / original height) x new height = new width 
Category: Graphic Design :: Article: 662

What?
This code snippet took me a while to do and the documentation is flaky so I thought I'd make a note here just in case I need to refer to it again.

Why?
I want to modify a picklist and fill it with options from a certain time of the day to the closing time of the day (working hours).

How?
The plan is to iterate through a 24-hour clock, enable adding to the picklist when the starting hour is found and stop adding when the closing hour is found. The picklist field is called "Time_Field".

What?
So this is NOT an article on how to create a MD5 function for an ETag in Zoho Deluge as I expected it would be. At time of print, the Zoho documentation (and Google search results) make no mention of using MD5 in an encryption task.

Why?
I'm trying to create an ETag for a synchronization process between Zoho Creator and Zoho CRM. Combining all the fields to compare into a single field can't be done via the documented methods (base64, urlencode or AES) as this exceeds 255 characters (it could be a multiline but this would defeat the objective of an Etag).

How?

What?
So another quick note as I couldn't find a solution on the forums. This is to hide the reset button on a non-stateless form (state form?). I have posted this on the Zoho forums as well but here goes:

Why?
Because I can. And because as someone said, a "reset" button is so 1990. I have a confirmation page and don't want the button to show so...

How?

What?
So I thought I'd write an article to help me resolve the particular issue where the organization details and the header of the product line items table would display on the first page, the product line items would then print on the second page, with the terms and conditions or small print notes on a third page.


How?

What?
A super quick article to show how to link to the thumbnail image of a Google Drive file, in this case a video file.

How?
The hardest part of this is to get the Google Drive File ID (which you need for the below). The image link (src) will be as below but then this is a redirect to the actual thumbnail stored by Google Drive:
copyraw
https://drive.google.com/thumbnail?authuser=0&sz=w320&id=<GOOGLE_DRIVE_FILE_ID>

// where <GOOGLE_DRIVE_FILE_ID> is the file id
  1.  https://drive.google.com/thumbnail?authuser=0&sz=w320&id=<GOOGLE_DRIVE_FILE_ID> 
  2.   
  3.  // where <GOOGLE_DRIVE_FILE_ID> is the file id 
Category: Google :: Article: 654

What?
This is a very quick note with the code to retrieve the full day name from a date (eg. "Monday").

Why?
If I use the toString() function to get the day, it only returns the first 3 letters of the day (eg. "Mon").
copyraw
My_Date = today;
Day_Name = My_Date.toString("E");  // returns "Mon"
  1.  My_Date = today
  2.  Day_Name = My_Date.toString("E");  // returns "Mon" 
How?
Category: Zoho :: Article: 653

What?
This is a very quick note with the code to determine the English ordinal of a date (eg. "st" of "1st"). So in a date, instead of "Tuesday, 6 November 2018", I could want "Tuesday 6th of November 2018".

Why?
Well there's a long a way to do it (but reliable). But being limited to the lines of code you can run (ref. "Maximum number of executable statements", anything that reduces the number of lines used would be an improvement. This is how I was doing it previously.
copyraw
// get the date (eg. 1, 2, 3, ... 29, 30, 31)
	This_Day_Date = My_Date_Field.toString("d");

	// determine English ordinal
	English_Ordinal = "th ";
	if(This_Day_Date == "1" || This_Day_Date == "21" || This_Day_Date == "31")
	{
		English_Ordinal = "st ";
	}
	if(This_Day_Date == "2" || This_Day_Date == "22")
	{
		English_Ordinal = "nd ";
	}
	if(This_Day_Date == "3" || This_Day_Date == "23")
	{
		English_Ordinal = "rd ";
	}

	// display
	info My_Date.toString("d") + English_Ordinal;
  1.  // get the date (eg. 1, 2, 3, ... 29, 30, 31) 
  2.      This_Day_Date = My_Date_Field.toString("d")
  3.   
  4.      // determine English ordinal 
  5.      English_Ordinal = "th "
  6.      if(This_Day_Date == "1" || This_Day_Date == "21" || This_Day_Date == "31") 
  7.      { 
  8.          English_Ordinal = "st "
  9.      } 
  10.      if(This_Day_Date == "2" || This_Day_Date == "22") 
  11.      { 
  12.          English_Ordinal = "nd "
  13.      } 
  14.      if(This_Day_Date == "3" || This_Day_Date == "23") 
  15.      { 
  16.          English_Ordinal = "rd "
  17.      } 
  18.   
  19.      // display 
  20.      info My_Date.toString("d") + English_Ordinal; 

How?
Category: Zoho :: Article: 655

What?
This is an article which lists the functions necessary to process Google Authentication using OAuth2.0. These functions allow a script to simply be loaded and to either create a token file, or use the existing one as long as it hasn't expired.

Update 2019
This script requires a user to authenticate the google account. I have a newer article called Google Drive API v3 - OAuth2 using Service Account in PHP/JWT documenting a script which accesses a Google Drive using a Service Account (unattended).

Why?
This is a big cop-out as I simply took someone else's functions and upgraded them to use the mentioned token based authentication. I find myself going through the motion and designing on a per-app basis so I wanted a standard way of doing it and I'll update this article as I improve on the code.

How?

Credit where Credit is Due:


Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.

Disclaimer: Please note that the information provided on this website is intended for informational purposes only and does not represent a warranty. The opinions expressed are those of the author only. We recommend testing any solutions in a development environment before implementing them in production. The articles are based on our good faith efforts and were current at the time of writing, reflecting our practical experience in a commercial setting.

Thank you for visiting and, as always, we hope this website was of some use to you!

Kind Regards,

Joel Lipman
www.joellipman.com

RSS Feed

Related Articles

Joes Revolver Map

Joes Word Cloud

name   parameter   find   system   source   user   website   first   list   field   uploaded   create   server   function   form   where   client   windows   error   deluge   license   need   date   case   note   version   joomla   database   value   work   google   following   display   time   added   zoho   page   script   table   used   order   creator   file   mysql   code   report   using   data   would   files   JoelLipman.Com

Accreditation

Badge - Certified Zoho Creator Associate
Badge - Certified Zoho Creator Associate

Donate & Support

If you like my content, and would like to support this sharing site, feel free to donate using a method below:

Paypal:
Donate to Joel Lipman via PayPal

Bitcoin:
Donate to Joel Lipman with Bitcoin bc1qf6elrdxc968h0k673l2djc9wrpazhqtxw8qqp4

Ethereum:
Donate to Joel Lipman with Ethereum 0xb038962F3809b425D661EF5D22294Cf45E02FebF
© 2024 Joel Lipman .com. All Rights Reserved.