When working in Advanced Portal Designer templates, these are the special tags that can be used. A special tag is specified with question marks, like this example:

<?action('CustomerCard',Customer)?>

This example will add a link into the page to open the CustomerCard action, and pass the Customer table as a parameter. You can activate intellisense with Ctrl-Space in the template to have the editor help you find the right tags and their parameters.

Tag Short title Function Returns into the file Parameter 1 Parameter 2 Parameter 3 Parameter 4
action Insert URL for action Insert URL for action Action URL Action Table    
add Legacy add Add a value to a field Added value Table Field Value to add Format string (optional)
apd Get the path of the webapp Get the path of the webapp for APD Return webapp path from APD setup        
auth IF authenticated Allow block if user is authenticated, encapsulate with <?endif?>          
auth0link Link for Auth0 login Construct link for Auth0 login page Login Link        
auth0logoutlink Link for Auth0 logout Construct link for Auth0 logout page Logout link        
calc Calculates an expression Calculates an expression Calculation result Formular Decimal format string (optional)    
calcdate Calculates a date Calculates a date Calculated date Date formular starting date (expression) (optional) Date format string (optional)  
caption Get caption from a field Get caption from a field Field caption Table Field    
close Close a table Close a table   Table      
codeunit Call codeunit Call into a codeunit and return output directly in page Codeunit text output Codeunit No. Parameter 1 passed to codeunit Parameter 2 passed to codeunit Parameter 3 passed to codeunit
company User APD Company Get the current APD Company Company ID (APD, not BC)        
companyname Company Name Gets the current BC Company Name BC Company Name        
count Get number of records Get number of records in table Record count Table      
edit Edit field Add a edit form field linked to a BC field with validation Edit field control Table Field    
else Else clause Else clause in <?if?> statement          
endif End of <?if?> statement End of <?if?> statement          
endloop End of <?loop()?> block End of <?loop()?> block   Table Step count
1=1 row forward
-1=1 row backwards
   
field Get the value of a field Get the value of a field Field value Table Field Format string (optional)  
fieldname Field name Return a field name Field name, if specified ‘SQL’ as second parameter, the name is sanitized Table Field SQL (optional)  
filter Apply a filter to a table Apply a filter to a table   Table Field Filter string  
findlast Find last record Find the last record with the current filters   Table      
get Gets a record from a table Gets a record from a table   Table Primary key 1 field value Primary key 2 field value Primary key 3 field value
hidden Hidden form field Add a hidden form field Hidden form field Table Field    
if IF logic expression Allow block if logic test is true, ecapulate with <?endif?> or <?else?>   Table (specify 0 if testing parameters) Field or COUNT or EMPTY
If table = 0, parameter expression.
Logic operator:
‘=’ Equal
‘<‘ Lessthan
‘>’ GreaterThan
‘<=’ LessEqual
‘>=’ GreaterEqual
‘<>’ Different
(Must be in single quotes)
Comparison value (Expression)
indent Indentation spaces Create indentation space number of spaces (emsp;) Number of spaces (expression)      
init Legacy Init Legacy function, insert link to javascript library          
key Build key string Build a key string for record Key string Table Source (optional)
1 = Table
2 = Query string fields
   
loginerror Last error encountered Last error encountered Error text        
loginok URL for accepted login URL for accepted login Redirect URL after approved login.        
logout Logout the current session Logout the current session          
lookup Lookup button for a edit Create a lookup button for a edit field HTML lookup button (Legacy function)      
loop Loop of table Start loop of table, block is encapsulated with <?endloop?>   Table Starting position:
‘-‘ = First
‘+’ = Last
   
loopend End of <?loop()?> block End of <?loop()?> block   Table Step count
1=1 row forward
-1=1 row backwards
   
loopno Current loop number Return the current loop number, often used for line numbering Loop number Table      
mimetype Set the mime type Set the mime type of page   New MimeType      
new Initialize a new record Initialize a new record   Table      
next Link for next page Create link for next page Next page link (<a>) Table Step count
1=1 row forward
-1=1 row backwards
   
no User BC number The BC number of the logged-in user (example: customer number) BC Number        
open Open table Open table Open a table for use (same as the <?table()?> tag Table      
options Legacy options Legacy function for option field values select          
pageno Current page number Get current page number for a table Page number Table Page Size Step count (same as on <?endloop()?>  
pages Page count for table Get the maximum pages for a table Total page count Table Page Size    
parm Parameter value Get the value of a parameter Parameter value Parameter name (from querystring or post data)      
prev Link previous page Create link for previous page Previous page link (<a>) Table Step count
1=1 row forward
-1=1 row backwards
   
profile IF security profile Allow block if user has security profile, encapsulate with <?endif?>   Profile      
profiles IF multiple security profiles Allow block if user has multiple security profiles, encapsulate with <?endif?>   Profiles as BC filter      
raw Raw field value Get the value of a field as a raw value (no localization of dates etc) Raw value, escaped Table Field Format string (optional)  
rawhtml Field value as raw HTML Get the value of a field as raw HTML Field value in raw html (Typically used if field contants HTML), content will not be escaped (Injection possible) Table Field Format string (optional)  
rawselect Legacy select control            
report Legacy report Legacy function, embed output of report as html Return webapp path from APD setup        
row IF row is even Allow block if row number is even, encapsulate with <?endif?>   Table      
security Verify that a user has a security profile Verify that a user has a security profile   (Legacy function)      
select Legacy select control            
select2 Legacy select control            
sessionid Current SessionID Gets the current SessionID SessionID        
set Set parameter value Sets a “parm” parameter value   Parameter Value (expression)    
setkey Set table sorting Set the sorting for a opened table   Table      
show Read only field Add a edit field in read only mode Read-only field control Table Field    
super IF Super user Allow block if user is marked “Super User” on APD user card, encapsulate with <?endif?>          
table Open table Open table Open a table for use (same as the <?open()?> tag Table      
tablename Table name Returns the table name table name, if specified ‘SQL’ as second parameter, the name is sanitized Table SQL (optional)    
time Get the current time Get the current time Current time Time formatting string(optional)      
today Get todays date Get todays date Today’s date Date formatting string (optional)      
upload File upload structure Creates an file upload structure HTML Form with upload field Action Additional parameter to upload actions (parm=value&parm2=value format)    
userid Current User Gets the current User User ID (APD User, not BC)        
usertype IF user type Allow block if user is specific type, encapsulate with <?endif?>   User type:
1=Customer
2=Vendor
=Contact
4=Salespeople
     
wsfn Get the path of the webapp Get the path of the webapp for APD