Using suiteql how do I extract the url of a custo...
# ask-stanley-ai
r
Using suiteql how do I extract the url of a custom image field on an item page
c
AI generated answer (using internal Slack threads):
Based on the conversations, it appears that SuiteQL does not support image fields directly. However, you can use a workaround to get the URL of the image. You can join the
ItemImage
table with the
File
table on the
Name
field and then join the
File
table with the
MediaItemFolder
table on the
Folder
field. Here is a sample query:
Copy code
sql
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 )
Please replace
1671
with the actual item ID you are interested in. This query will return the URL of the image file associated with the item. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.818563938
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.814246953
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.811603904
Please provide your feedback on this answer.