• CARB
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies

I have a visualforce e-mail template quote with the logo on it. Before I had a logo uploaded in the documents and I was inserting the link from the document for my PDF attached quote. Like this:

<img src="http://url-to-the-image" alt="Name" style="width:100%; max-width:150px; color:#767676; font-size:30px; font-weight:bold;" />
EVERYTHING was fine.

Now we are using the same quote for different companies. Based on the company the logo is changing. For this I created a field in Opportunity "Logo" with a picklist. In the picklist I have links to URL from the documents for these images. 

<apex:image url="{!relatedTo.Logo__c}" style="width:100%; max-width:150px; color:#767676; font-size:30px; font-weight:bold;"/>
 

Here is part of my code:

<messaging:attachment renderAs="pdf" filename="{!relatedTo.name}">
        <html>

        <head>
            <meta charset="utf-8" />
            <title>DEVIS</title>
        </head>

        <body>
            <div style="max-width:950px;         margin:auto;                  font-size:14px;         line-height:20px;         font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;">
                <br/>
                <table cellpadding="0" cellspacing="0" style="width:100%; line-height:inherit; padding-bottom:5px;">
                    <tr>
                        <td style="padding:5px; vertical-align:top;">
                            <a href="http://{!relatedTo.Company_link_for_website__c}" style="text-decoration: none;" target="_blank">
                                <apex:image url="{!relatedTo.Logo__c}" style="width:100%; max-width:150px; color:#767676; font-size:30px; font-weight:bold;"/>
                            </a>
                            <br/>
                        </td>
 


...............

 

So, the issue it:

When I send the quote the image is inserting correctly. HTML letter is showing the correct logo with a correct size as it is stated in html code. But when I open PDF attached I see a little image (logo) with the dimensions of 10px - 10 px. I cannot get it why is it changing the size. What I tried:

1. I tried to make the code without <apex:

<img src="{!relatedTo.Logo__c}" alt="{!relatedTo.Genre__c}" style="width:100%; max-width:150px; color:#767676; font-size:30px; font-weight:bold;" />

2. I tried to remove : width:100%;

3. I tried to write the size without the "px" : max-width:150;

4. I tried to remove this: width:100%; max-width:150px;      and to put instead: width: 100; height: 100;
5. To remove  font-size:30px;

I always see my logo like that (little blue line on the left)

Little blue line on the left is my logo

What am I doing wrong?

When I use the hard-core URL to the image, it works fine:

<img src="http://url-to-the-image" alt="Name" style="width:100%; max-width:150px; color:#767676; font-size:30px; font-weight:bold;" />
  • February 12, 2018
  • Like
  • 0
Hi Team

I want to create a Trigger when a new event containing the word 'demenagement' is created that will:

1. copy the date and time of this event into an opportunity field 'Date Demenagement'
2. copy the rest of the text name in another field Resources.

EX: Demenagement 23c - 45p it should write the text 23c - 45p inside of Ressources field. Thank you for your help
  • December 07, 2015
  • Like
  • 0
How can I copy a date field from Event to opportunity.

Ex: OppABC has a Event with Start & End Date. Event has been created using SF default New Event option

I wanted to copy Start Date of the event if Subject is AAA 
I am new to Apex Coding / Triggers and I am stuck. I'm trying to create a trigger where when an event is created with a specific subject line, it automatically populates an "Appointment Date" custom field on the Opportunity object. Where do I begin? Thank you!