This topic contains 4 replies, has 0 voices, and was last updated by james@pacificcolumns.com 9 years, 1 month ago.
-
AuthorPosts
-
September 23, 2015 at 12:41 pm #2122
james@pacificcolumns.comHi there,
We are trying to include some dynamic images in our Advanced PDF/HTML Templates, it is an Estimates template. We are trying to include an image of the item in the form. We have the images saved by the NetSuite item number on a server outside of NetSuite.
So if I enter ${item.item} in my list loop in the template, the item number prints correctly. Let’s say item number is ABCD.
I have this image named ABCD.jpg on a cdn, so to view this image it would be “http://some.cdn.com/images/ABCD.jpg”. In the template I would have something like:
However, when I go to save the template I receive the following error:
The template cannot be saved due to the following errors:
Can’t load image from “http://some.cdn.com/images/.jpg”
java.io.FileNotFoundException: Forbidden
As you can see it is not populating the ${item.item} part of it, so the template thinks the image src is invalid and prevents me from saving the document.
Do I have something set incorrectly above?
Is there a fix for this?
Can I disable the Template “checking before save” function?
Thank you,
James
This is a cached copy. Click here to see the original post. -
September 24, 2015 at 5:24 pm #2123
Stuart BarnabyHi,
I’m trying to do the same thing so will be interested in the answer to this as well.
Kind regards,
Stuart
-
September 24, 2015 at 6:39 pm #2124
michoelAssuming that this problem is only happening when it tries to save the template and not when it is actually run – perhaps a workaround could be to prefix all the images on the CDN, e.g. img_ABCD.jpg, and have a file there called img_.jpg.
-
September 25, 2015 at 12:52 pm #2125
james@pacificcolumns.comHi Michoel,
Great idea! This does get around the saving of the template, however, it triggers an error when the email attempts to send. This is really an error in how it is processed, and I opened a ticket with NetSuite, but their support didn’t have a solution for this. Any other ideas? I need this to work.
Thank you,
James
-
September 28, 2015 at 10:13 am #2126
james@pacificcolumns.comOk. I figured out a work around. So basically for dynamic images you need to create an if statement off of a value that doesn’t get populated when you save the template. Here is my example:
The field I am using is a custom field assigned to our employee record, but could work on item records as well. I then have a static url, that is a working url or image. I hope this helps someone.
Thank you,
James
-
AuthorPosts
You must be logged in to reply to this topic.