528
edits
No edit summary |
No edit summary |
||
Line 22: | Line 22: | ||
When you have navigated to the object list view, you can click on the “New” button which will display the new record form. What is important here is that you give the Value Formatter a unique name that has no spaces or special characters. Don’t worry about enforcing this rule yourself, we have built a salesforce validation rule to make sure that the name of the Value Formatter is compliant with 3B Docs. | When you have navigated to the object list view, you can click on the “New” button which will display the new record form. What is important here is that you give the Value Formatter a unique name that has no spaces or special characters. Don’t worry about enforcing this rule yourself, we have built a salesforce validation rule to make sure that the name of the Value Formatter is compliant with 3B Docs. | ||
To use the newly created Value Formatter with your template, you need to navigate to a Template record, load the editor, add a merge tag (TODO: Reference to Merge Tags) and click on the merge tag. | To use the newly created Value Formatter with your template, you need to navigate to a Template record, load the editor, add a merge tag (TODO: Reference to Merge Tags) and click on the merge tag. | ||
[[File:Adding Value Formatter.png|thumb|Adding Value Formatter]] | |||
From the options list, select the value formatter that you want to apply to the merge tag. The merge tag will be transformed from say <code>{Contact.Id:CreatedDate}</code>to <code>#{Contact.Id:CreatedDate>EU_Date_Format}</code> . This arrow right chevron indicates that the merge tag is to be formatted by the Value Formatter with the same name immediately after the chevron. | |||
== Syntax == | == Syntax == | ||
Line 61: | Line 63: | ||
=== API Callouts === | === API Callouts === | ||
You can use Function Expressions to do callouts, fetch data externally, load additional resources, use JavaScript Libraries such as FullCalendar | You can use Function Expressions to do callouts, fetch data externally, load additional resources, use JavaScript Libraries such as [https://fullcalendar.io/ FullCalendar], [https://www.chartjs.org/ Chart.js], [https://datatables.net/ Datatables] and many more..<syntaxhighlight line="1"> | ||
var getJSON = function(url, callback) { | var getJSON = function(url, callback) { | ||
var xhr = new XMLHttpRequest(); | var xhr = new XMLHttpRequest(); | ||
Line 87: | Line 89: | ||
}); | }); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[[File:FullCalendarJs.png|thumb|Full Calendar JS library]] | |||
[[Category:3B Docs Features]] | [[Category:3B Docs Features]] |