How can I pull in the item image to our Estimate f...
# advancedpdf
g
How can I pull in the item image to our Estimate form? We have the following code that pulls in the image to create a PDF label.
Copy code
var imageid = rec.getValue({fieldId:'custitem81'});
                if(!isEmpty(imageid)){
                	var lookup = search.lookupFields({type:'file',id:imageid,columns:['url']});
                	var imageurl = lookup.url
                	if(!isEmpty(imageurl))
                		imageurl = imageurl.split('&').join('&');
                		customData.itemurl = imageurl;
                }
I am wondering how I could do this within the Advanced HTML/PDF Forms environment using Freemarker syntax? I am at a loss as to what I can call to pull the image URL. The custom label that points to the image, <custitem81>30012</custitem81>, stores the file number. Inside the file details screen, I can see the various URLs generated but I just don't know how to pass that data back to the estimate record. I don't see any of that when trying to source that data to a custom transaction line field. Any help with this is greatly appreciated. Thanks in advance.
m
Have a look at SuiteAnswers # 45132, though I'm sure this can be significantly optimized by doing a single search with all the items instead of loading each record
g
@michoel In the SuiteAnswers instructions it states to select Free-Form Text and set the LIST/RECORD to Transaction
Copy code
Configure the field with the following settings:
Label: Image URL
Type: Free-Form Text
List/Record: Transaction
Store Value: is checked
Under the Applies To tab, place a check mark on Sale Item
But I am not able to do both. I either have to set the TYPE to List/Record and then select Transaction in LIST/RECORD or I have to select free-form text and leave the LIST/RECORD greyed out. Which route do I have to take to implement this?
m
?
g
Sorry, I fat-fingered the enter button. Please see my edit in my previous message.
m
It's a particularly poor quality SuiteAnswer. Leave List/Record blank