Activity Forums Salesforce® Discussions Setup Product Images to display on Quote Templates

  • Anup

    Member
    June 22, 2016 at 8:24 am

    Hi Bruce,

    It is very much possible. If you are to use an Online Image Storage then that sounds pretty feasible. You could have a Url field on the Product that would be used to store the Image url. (You can use Files Object for this as well). And then create a Formula field on the QuoteLineItem
    "(IMAGE(Product2.ImageUrlField__c, "Image Not Available", 75,75))". Having done this we could have the Quote template looking at this field and the Image could be populated.

    Please let us know f this Helps in any way.

  • Naman

    Member
    June 22, 2016 at 11:11 am

    Hi Bruce,

    We could use the Salesforce Content to store the image and can generate the public url of the same. But you need to make sure that the image is not added to the Libraries yet because after that you cannot generate the public url of your image. Create formula field using IMAGE tag and give src to your image url.

    You have to make some changes in your Public url. For instance my public url for image is - https://cs44.salesforce.com/sfc/p/#7A000000Cq0q/a/7A0000004Ex1/k6Xrx12VdrGDttoF1GfB60Yn8uen5zJ_3.9NETWbjIA

    To use the above url in formula field, you need to manipulate it like below:

    String endUrl = contentVersionIDUrlMap.get(contentVer.ContentDocumentId).split('/a/',2)[1];
    String host = URL.getSalesforceBaseUrl().toExternalForm();
    String downUrl = host+'/sfc/dist/version/download ids='+contentVersion.id+'&oid='+orgId+'&d=/a/'+endUrl;

    And after that your url would be looking like below:

    https://cs44.salesforce.com/sfc/dist/version/download?ids=0687A00000055ioQAA&oid=00D7A000000Cq0qUAC&d=/a/7A0000004Ex1/k6Xrx12VdrGDttoF1GfB60Yn8uen5zJ_3.9NETWbjIA

    Now you can use this url into your formula field on product and this will result you the desired image.

    Let me know if you need more info on this.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos