Imprimir      Abrir a versão em PDF da Ajuda on-line


Previous Topic

Next Topic

HTML Code for Note Fields and Workflow Email Messages

HTML formatting is supported in the Message field in workflow Send Email actions. If the Enable HTML Formatting check box on the company profile is selected, then HTML formatting is also supported in fields of the Note field type, including custom fields of that type.

When using HTML code in the Message field in an email in a workflow Send Email action, note the following points:

  • When you save your workflow action, extra line breaks and spaces might be added to the email message. These extra lines and spaces do not appear in the email that is sent to the recipient.
  • If an expression within the HTML email message evaluates to a string that contains an HTML tag, then when Oracle CRM On Demand sends the email, the tag is encoded so that it is treated as text rather than HTML code by the recipient's email application.

    For example, assume that an email message contains the expression %%%[{Description}]%%% to return the value of the Description field, and that the Description field contains the following HTML code:

    <b>This is the description</b>

    In this case, when the expression is evaluated, the tags that are returned as part of the value of the field are not interpreted as HTML code. Instead, the value of the Description field appears in the email message exactly as it appears in the Description field in Oracle CRM On Demand, including the <b> and </b> tags.

  • If the recipient's email application does not support HTML, then the email application determines how the HTML message is displayed for that recipient.
  • For the HTML email message, Oracle CRM On Demand supports a subset of the elements that are supported in HTML5. Se você usar um elemento que o Oracle CRM On Demand não suporta para uso em uma mensagem de e-mail de workflow, as tags do elemento não suportado serão removidos da mensagem de e-mail quando você salvar a ação de workflow. Nenhuma mensagem de erro será exibida. In the case of certain elements, the content of the element is also removed from the message.

When using HTML code in a field of the Note type, you must use the toolbar in the HTML editor to apply HTML formatting to the text in the field. Tags that are entered as text while the HTML editor is enabled are not interpreted as HTML tags.

The rest of this topic provides details of the supported and unsupported elements.

Supported Elements and Attributes

The following table lists the elements that Oracle CRM On Demand supports for use in workflow email messages and in fields of the Note type, and the attributes that are supported for the elements. For information about the properties that are supported for use with the style attribute, see the Supported Properties for the style Attribute section of this topic.

Supported Elements

Supported Attributes

<a>

  • href
  • rel
  • style

    NOTE: Using any value other than nofollow with the rel attribute for the <a> element might cause cross-site scripting security issues.

<abbr>

  • style
  • title

<address>

style

<b>

style

<bdo>

  • dir
  • style

<big>

All attributes

<blockquote>

style

<br>

style

<caption>

style

<center>

All attributes

<cite>

style

<code>

style

<col>

  • span
  • style

<colgroup>

  • span
  • style

<dd>

style

<del>

style

<dfn>

style

<div>

style

<dl>

style

<dt>

style

<em>

style

<fieldset>

style

<font>

  • face
  • size

<h1>

style

<h2>

style

<h3>

style

<h4>

style

<h5>

style

<h6>

style

<hr>

style

<i>

style

<img>

  • alt
  • border
  • height
  • src
  • style
  • width

<ins>

style

<legend>

style

<li>

style

<ol>

style

<p>

style

<pre>

style

<q>

style

<s>

style

<samp>

style

<small>

style

<span>

style

<strike>

All attributes

<strong>

style

<sub>

style

<sup>

style

<table>

style

<tbody>

style

<td>

  • colspan
  • headers
  • rowspan
  • style

<tfoot>

style

<th>

  • abbr
  • colspan
  • headers
  • rowspan
  • scope
  • style

<thead>

style

<tr>

style

<tt>

All attributes

<u>

style

<ul>

style

<var>

style

For more information about HTML5, see the HTML5 specification on the World Wide Web Consortium (W3C) Web site.

Unsupported Attributes

If you edit a workflow Send Email action that contains an unsupported attribute in the email message, then the attribute will be deleted when you save the updated workflow action.

If you attempt to include an unsupported attribute in the email message when you create a new workflow Send Email action, then the attribute will be deleted when you save the workflow action.

If a field of the Note field type contains an unsupported attribute, and if the Enable HTML Formatting check box on the company profile is selected, then the attribute will be deleted the next time the field is updated and the record is saved.

Supported Properties for the style Attribute

The following cascading style sheet (CSS) properties are supported for use with the style attribute, which can be used with all of the elements that are supported for use in the messages in workflow emails and in fields of the Note type:

  • color
  • font-family
  • font-size
  • font-style
  • list-style-position
  • list-style-type
  • text-align

If you use a property that Oracle CRM On Demand does not support for use with the style attribute in a workflow email message, then the unsupported property is removed from the style attribute when you save the workflow action.

If the Enable HTML Formatting check box on the company profile is selected, then:

  • If an unsupported property is used with the style attribute in a field of the Note type on an imported record, then the property is removed from the style attribute when the record is imported.
  • If an unsupported property was used with the style attribute in a field of the Note type before the Enable HTML Formatting check box was selected, then the property is removed from the style attribute the next time the field is updated or the record is edited in the record Edit page after the check box is selected.

Unsupported Elements

Se você usar um elemento que o Oracle CRM On Demand não suporta para uso em uma mensagem de e-mail de workflow, as tags do elemento não suportado serão removidos da mensagem de e-mail quando você salvar a ação de workflow. Nenhuma mensagem de erro será exibida.

If the Enable HTML Formatting check box on the company profile is selected, then:

  • If an unsupported element is used in a field of the Note type on an imported record, then the tags for the element are removed when the record is imported.
  • If an unsupported element was used in a field of the Note type before the Enable HTML Formatting check box was selected, then the tags for the unsupported element are removed the next time the field is updated or the record is edited in the record Edit page after the check box is selected.

When an unsupported element is removed, the content of the element is retained, except in the case of the following elements. For these elements, both the tags and the content of the element are removed for security reasons:

  • <applet>
  • <area>
  • <base>
  • <basefont>
  • <button>
  • <form>
  • <frame>
  • <frameset>
  • <iframe>
  • <input>
  • <isindex>
  • <label>
  • <link>
  • <map>
  • <menu>
  • <noframes>
  • <noscript>
  • <object>
  • <optgroup>
  • <option>
  • <param>
  • <script>
  • <select>
  • <style>
  • <textarea>

Deprecated Attributes

Some attributes that were supported in the past have now been deprecated. The deprecated attributes are not automatically deleted from any existing workflow email message unless the workflow action is edited. Similarly, the deprecated attributes are not automatically deleted from a field of the Note field type, unless the record with the field is edited. However, the attributes might not work at all, or might not work as expected.

The following table lists the deprecated attributes.

Supported Elements

Deprecated Attributes

<col>

  • align
  • valign
  • width

<colgroup>

  • align
  • valign
  • width

<div>

align

<hr>

  • align
  • size
  • width

<img>

  • align
  • hspace
  • vspace

    NOTE: If any of the deprecated attributes are used with the <img> element in an existing workflow email message or a field of the Note field type, then cross-site scripting security issues could arise.

<p>

align

<table>

  • align
  • bgcolor
  • border
  • cellpadding
  • cellspacing
  • height
  • width

<td>

  • abbr
  • align
  • bgcolor
  • height
  • width

<th>

  • align
  • bgcolor
  • height
  • width

<tr>

  • align
  • height
  • valign
  • width

Example of an HTML Message

The following example shows how Oracle CRM On Demand handles an HTML message in a workflow email. In this example, the workflow action sends an email to the members of a team when an opportunity with high priority is created.

The message might be entered in the Message field in the Send Email workflow action as follows:

<html>

<body>

<pre>

<b>Team,</b>

<script>alert(“Good News”);</script>

The <i>%%%[{Name}]%%%</i> opportunity created by %%%[{Created By Full Name}]%%% appears to be a <b>high potential</b> opportunity. <b>Please target it as a priority so that we can add it to the next quarter.</b>

Thanks and regards,

David

</pre>

</body>

</html>

NOTE: If you do not use the <pre> element to enclose the message content, then you must use the <br> tag to specify each line break.

The email message as it was entered includes instances of the <html>, <body>, and <script> elements, which are not supported. When the workflow action is saved, the tags for the <html> and <body> elements are removed, but the contents of these elements are retained. In the case of the <script> element, both the tags and the content of the element are removed. The message then appears as follows in the saved workflow action:

<pre>

<b>Team,</b>

The <i>%%%[{Name}]%%%</i> opportunity created by %%%[{Created By Full Name}]%%% appears to be a <b>high potential</b> opportunity. <b>Please target it as a priority so that we can add it to the next quarter.</b>

Thanks and regards,

David

</pre>

When the email is sent, the message appears as follows in an email application that supports HTML:

Team,

The Auto Manufacturer opportunity created by Amanda Jacobsen appears to be a high potential opportunity. Please target it as a priority so that we can add it to the next quarter.

Thanks and regards,

David


Publicado em março de 2021 Copyright © 2005, 2021, Oracle e/ou suas empresas afiliadas. Legal Notices.