Here you type the body of the email. Again, this can be a fixed text or combined with the dynamic syntax and/or one or more of the special keywords.
TIP: FOR FULL LIST OF SPECIAL KEYWORDS, PLEASE SEE APPENDIX 1
KEYWORDS
DateFormat(DynamicSyntax|FORMAT) can be used to format dates using a format.
Example:
DateFormat($[$10.0.DATE]|dd-MM-yyyy)
Will give:
31-01-2012
PLEASE NOTE: YOU NEED TO USE .DATE IN THE DYNAMIC SYNTAX
PLEASE NOTE: YOU CAN USE THE KEYWORD TODAY DATEFORMAT(TODAY|FORMAT) TO GET TODAY’S DATE
Formats available:
Format
|
Description
|
Example
|
d
|
Day without leading zero
|
5
|
dd
|
Day with leading zero
|
05
|
ddd
|
Day as text (shot)
|
Mo
|
dddd
|
Day as text (long)
|
Monday
|
M
|
Month without leading zero
|
9
|
MM
|
Month with leading zero
|
09
|
MMM
|
Month as text (short)
|
Sep
|
MMMM
|
Month as text (long)
|
September
|
yy
|
2-digit year
|
08
|
yyyy
|
4 digit year
|
2008
|
You can use the TimeFormat keyword to format a time:
TimeFormat(Time|Format).
Example:
TimeFormat($[SERVERTIME]|h:mm).
Formats available: http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx (Or google Custom Date and Time Format Strings)
SQLHtmlTable(<sql>) this will if given a SQL create a HTML table with a header containing the name of the columns and create rows containing the values.
Example: SQLHtmlTable(SELECT CardCode, CardName FROM OCRD)
Tip: You can style the table using normal CSS. The class for table is: defaultTable.
Example (add borders to the table):
<style>.defaultTable, th, td {
border: 1px solid black;
}
</style>
SQLHtmlTable(SELECT CardCode, CardName FROM OCRD)
PLEASE NOTE: IT WILL MAKE A HTML TABLE SO YOU SHOULD SWITCH THE BODY TYPE TO HTML
SQL(<sql>) this will if given a SQL insert the first value returned by the SQL into the email body.
Example: SQL(SELECT Balance FROM OCRD WHERE CardCode = '$[$4.0.0]')
Tip: If you need to make a Right to Left email in B1 Print & Delivery (Hebrew and other) in HTML this can be done by adding the following DIV Style:<div style="direction: rtl;">CONTENT</div>. See a sample here
|