• Stéphane CLARET
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 4
    Replies
You can try with a very simple formula field with just IMAGE() like:

Contact.Avatar__c = "IMAGE("http://fr.pageondemand.com/emailing/signature_pictures/SCL.jpg", "SCL")"

and create a Visualforce Email Template with:

<messaging:emailTemplate subject="Test for merging HTML fields" recipientType="Contact" relatedToType="Contact">
<messaging:htmlEmailBody >
<html>
<br/>
This is when merging the field:<br/>
{!relatedTo.Avatar__c}<br/>
<br/>
This is when puting the HTML code directly in the template code:<br/>
<img src="http://fr.pageondemand.com/emailing/signature_pictures/SCL.jpg" alt="SCL" border="0"/>
</html>
</messaging:htmlEmailBody>
</messaging:emailTemplate>


Merge with any contact and see: the merged field is not interpreted as HTML.

If you look at it in an email, you will see that 

<img src="http://fr.pageondemand.com/emailing/signature_pictures/SCL.jpg" alt="SCL" border="0"/>

has been replaced by:

&lt;img src="http://fr.pageondemand.com/emailing/signature_pictures/SCL.jpg" alt="SCL" border="0"/&gt;

I didn't found any workarounds. I tyied of course <apex:outputText value="{!HTMLENCODE(relatedTo.Avatar__c)}" escape="false"/> with no better results.

I think this is a bug… but Salesforce Support sent me here "to be sure"…
Hi,

In some cases, saving lookup type records fields leads to error message saying that I have mistaken between __c and __r in the code. Which is just impossible since the flow designer do it all for you.

This strange phenomenon seems to happen in few cases, when I'm dealing with two of my custom object which API names are: podF_Contract__c and podF_Order__c. I'm wandering if the resemblance with Salesforce objects (Contract and Order) can be for something? Or this is just a bug?

Since images are more powerful than words,

Here it is my element settings:
My Element Settings

and this is how the code seams to be generated:
How the code is generated

Thanks for your help!
You can try with a very simple formula field with just IMAGE() like:

Contact.Avatar__c = "IMAGE("http://fr.pageondemand.com/emailing/signature_pictures/SCL.jpg", "SCL")"

and create a Visualforce Email Template with:

<messaging:emailTemplate subject="Test for merging HTML fields" recipientType="Contact" relatedToType="Contact">
<messaging:htmlEmailBody >
<html>
<br/>
This is when merging the field:<br/>
{!relatedTo.Avatar__c}<br/>
<br/>
This is when puting the HTML code directly in the template code:<br/>
<img src="http://fr.pageondemand.com/emailing/signature_pictures/SCL.jpg" alt="SCL" border="0"/>
</html>
</messaging:htmlEmailBody>
</messaging:emailTemplate>


Merge with any contact and see: the merged field is not interpreted as HTML.

If you look at it in an email, you will see that 

<img src="http://fr.pageondemand.com/emailing/signature_pictures/SCL.jpg" alt="SCL" border="0"/>

has been replaced by:

&lt;img src="http://fr.pageondemand.com/emailing/signature_pictures/SCL.jpg" alt="SCL" border="0"/&gt;

I didn't found any workarounds. I tyied of course <apex:outputText value="{!HTMLENCODE(relatedTo.Avatar__c)}" escape="false"/> with no better results.

I think this is a bug… but Salesforce Support sent me here "to be sure"…

I have created a Dynamic Choice in my VWF that queries Users that match a RoleId (looked up previously).  This works and I can see the users in the dropdown list.  The problem is that whenever I try to adjust the settings of the dynamic choice to sort the Users (doesn't matter which field I try to sort by) I receive an error:

 

Error: Correct the invalid field entries.

 

No fields are highlighted in red (which is normal behavior when you get this error).  The only thing that allows me to save at this point is to deselect the checkbox  for "Sort results by:".

 

Is this a bug or if not why can't I sort these records?

I have a multi-currency enabled org. Using the VF outfield tag , we are displaying a currency on Sites - The default currency of the the guest user is set of EUR- but the pricelist that applies to this usecase is in  CHF (Swiss Franc) , So the price is displayed as in this format  "CHF 308.00 (EUR 308.00)" - 

 

Is there a way to hide the EUR portion of the price, and just display the price in CHF?

 

Note that, I do not want to use outputText as i want to take advantage of the currency formatting provided by outputField tag...

 

Thanks