0
edits
Changes
→To display a list of Activities, Notes, Transactions, Contacts or Companies
:''where rolename is the role they are assigned on the Level 1 record''
=To display Display a list List of Activities, Notes, Transactions, Contacts or Companies===To display the entire list==:<font size="3">[#(?object=''objectname'';)~''fieldname1''~ ~''fieldname2''~#]'''</font>'''where:'''* objectname is one of: activity, contact, user, company, notes, association, transaction or level-1* fieldname1 and fieldname2 are the names of standard or custom fields on the object'''Notes:''' :* You can refer to [[Custom Fields]] on the objects using ''customfieldid'' instead of ''fieldname'' and replacing the tilde (~) with a dollar sign ($) :* ''level-1'' can only be used as an object when referenced from a contact record'''Examples:'''* To generate a list of Level 2 activities for a [[MS Word Merge]]: [#(?object=activity;)~status~ ~typename~ ~speciality~ $123456$~#]
*To generate a list of contacts for a [[Web Page View]] (note that the HTML table formatting is included within the '''[#...#]''' syntax)<pre><table>[#(?object= [activity/contact;)<tr><td>~firstname~</usertd><td>~lastname~</companytd><td>~email~</notestd></associationtr>#]</transaction or level-1]'''table>::Note: ''level-1'' can only be used as an object when referenced from a contact record.</pre>
==To sort the list=To sort Ascending::<pre><tablefont size="3">[#(?object=object''objectname'';orderby=field''fieldname'')<tr><td>~field''fieldname1''~</td><td>~field''fieldname2''~</td><td>~field~</td><td>$customfield id$</td></tr>#]'''</table></prefont>
To sort Descending::<font size="3">[#(?object=''objectname'';orderby=''fieldname'' desc)~''fieldname1''~ ~''fieldname2''Example~#]'''</font> '''Examples''':* To sort by Start Date in descending order:<pre> <table>[#(?object=activity;orderby=startdate desc)<tr><td>~subject~</td><td>~location~</td><td>~startdate~</td></tr>#]</table> </pre>* to
<pre>
<table>[#(?object=activity;orderby=startdate)<tr><td>~subject~</td><td>~location~</td><td>~startdate~</td></tr>#]</table>
<table>[#(?object=contact;orderby=lastname;criteria=rolename='Internal People')<tr><td>~firstname~</td><td>~lastname~</td><td>~email~</td></tr>#]</table>
</pre>
*Note: Search results normally display in ascending order. You may use '''desc''' option to display results in descending order.
'''Example''':
'''With Multiple Criteria''':
<pre>
e.g. where status.id='1234'</pre>
<pre>
~date_format(startdate,'%Y-%m-%d') as startdate~</pre>
*To avoid this, change ''"date_format(startdate,'%d-%m-%Y') as '''startdate'''"'' to ''"date_format(startdate,'%d-%m-%Y') as '''sdate'''"''
<!--@end-->
#] <br />
</pre>
'''where:'''
* num = number of activities that should be displayed
=Date/Time Variables=