Getting a Lead image url

Getting a Lead image url

Hi,
First of all, I love Zoho CRM!

I have Tasks related to Leads.
In the Tasks view, I want to see the Lead image.

As this is not supported, I'm trying my luck in building a Web Tab Widget that will show the Task list with Leads images.

To achieve this, I'm using the JS SDK (https://help.zwidgets.com/help/v1.2/index.html).

My problem is that I can't get the image url for the lead.

I know that the API has an image download (https://www.zoho.com/crm/developer/docs/api/download-image.html),  but that's HTTP API I'm using the SDK, and I actually don't want to download the image, I just want its URL.

It seems that URLs are hosted using this format:
`/crm/${orgId}/EntityImageAttach.do?action_module=Leads&entityId=${lead.id}&actionName=readImage&fileId=${lead.Record_Image}`

I can get the lead.id and lead.Record_Image from an SDK COQL query (ZOHO.CRM.API.coql https://help.zwidgets.com/help/v1.2/ZOHO.CRM.API.html#.coql).

Now my problem is that there seems to be 2 kinds of Record_Image.
COQL gives out a shorter version, e.g:
ixzlme8f46b89d45c40508accf48eb3c9e83d

When getting the object from the API, it gives out a longer version:
290e520264299ac1696be1cee4728b3fa4d2ef6360e98e9cf80d9a2427822a99b179df31eb0fbcee7fa8a704d26111faa50cea5aceca23b0bc20d9fda9edca8d6bfc7aa67b379f3ee6d7acd7a52957ca

I'm not sure why there are 2 versions of Record_Image, but the image URL only works with the long version.

Unfortunately, I'm using the SDK's COQL and getting the short version (which is nonworking in image URL).

Other options:
I haven't explored this, but the SDK does have a way to get the longer version:
ZOHO.CRM.API.getAllRecords https://help.zwidgets.com/help/v1.2/ZOHO.CRM.API.html#.getAllRecords
But that seems a little heavy (all records, paginated).

There's also:
ZOHO.CRM.API.getRecord https://help.zwidgets.com/help/v1.2/ZOHO.CRM.API.html#.getRecord
But that's for a single record, so for a list of tasks, I'd have to make many queries (one per task) and it's not a good idea.


So, bottom line:
* Why are there 2 versions of Record_Image (one in COQL and one in the API)
* How can I get the longer version in COQL?