Hi everyone. In SuiteQL, doing a query on Items....
# general
a
Hi everyone. In SuiteQL, doing a query on Items. Have a series of fields. one field I am trying to find (and failing miserably) is the item’s image on the website. In the Item view in the UI, under Web Store > Associated Images there is a file name for the Item iamge. Clicking on that image pulls up a File Name stored in the “Web Site Hosting Files” folder. But I can’t seem to find how to reference that when using the Analytics Workbook/Dataset. Any suggestions?
t
@Andrew Sussman Here's a query that you can use to get images for a given item.
Copy code
SELECT
	ItemImage.Item,
	ItemImage.Name,
	ItemImage.AltTagCaption,
	ItemImage.SiteList,
	File.CreatedDate, 
	File.LastModifiedDate, 
	File.FileType, 
	File.FileSize, 
	File.URL,
	MediaItemFolder.AppFolder
FROM
	ItemImage
	INNER JOIN File ON
		( File.Name = ItemImage.Name)
	INNER JOIN MediaItemFolder ON 
		(MediaItemFolder.id = File.Folder) 
WHERE
	( Item = 1671 )
a
Looks like ItemImage.Item is what I have been looking for. The Inner Join is really slow on the SuiteQL (take a 3.5s result up to 5.12s). While that’s only 1.6s difference, on 10k records that adds 4 hours to the query. So definitely not going to be a join I add to my base call. I’ll have to make that a separate utility call on a less regular basis. Thanks for the help @tdietrich