API quick reference

The APIs described here are available for your use in layout scripts. This is not a complete listing; for a full list of the APIs available in a layout and for documentation on each API, use IntelliSense in the Code Editor.

API Description
AddFilterAsWhereClause

ApplyFilterAsWhereClause

Automatically generates a WhereClause property with syntax appropriate to the data source. See Loading a collection of data.
AlertUser Allows an external application to call in to the portal and run server-side script under a specified user account. The request comes from outside the portal, but it can be made within the portal as well. See AlertUser API.
CreateDocument Returns an IPFDocumentl object with the specified name and content. For an example of using CreateDocument, see Exporting portal data to Excel.
CreateFilter Filters data to provide more specific detail. For example, use with NavigateToSitePage to determine what product’s data to display on a product detail page. See Page navigation.
CreateMethodParameters Creates an array of parameters for a data source method call. See Methods used on the data source.
CurrentSitePage Returns the page currently displayed in the browser. For CurrentSitePage, the Name property is available, which returns the name of the page.
GetAsset Returns an IPFDocumentl object that represents a requested portal asset. Allows you to retrieve assets for use anywhere on the portal, not just within a field display format. For example, GetAsset could be used for entries in the portals’ XML-based side menu. See GetAsset API.
GetString Explicitly fetches a translated string. (However, most UI labels are automatically translated from string IDs during page rendering.) See Translation, locale and culture.
GetValue TryGetValue Retrieves a value for a property or component and uses automatic data conversion. Use TryGetValue if you are not sure that automatic data conversion will succeed. See Getting and setting values - data conversions.
InvokeMethod Calls a method on a data source such as a back office data source. See Methods used on the data source.
LayoutVariables Persists variables specific to a display layout within an FDF instance. See Persistent variables.
Load

LoadFromMethod

Creates a temporary collection and loads the data. See Loading a collection of data.
LogError

LogMessage

Sends a general message or a log error message to the Windows Event Viewer. See Sending and viewing user messages and diagnostics.
NavigateTo Navigates to any URL. Can take a navigation type object. See Page navigation.
NavigateToSitePage Navigates to a specific page. Can take a filter to provide more information. Can also take a navigation type object. See Page navigation.
NavigateToSitePageAsURL Used with NavigateToURLOnClick property to return the URL rather than navigate to it. See Page navigation.
OnScriptInitializing Registers associated event handlers with an API. See Introduction to scripting with layouts.
PerformClick Performs a click on a given component and returns whether or not the click was successful. Available for any component that uses a clickable FDF. For an example of using PerformClick, see Exporting portal data to Excel.
SaveChanges Saves changed data back to the data source. See Saving a collection of data.
SendEmailAsPlainText Sends custom email messages from the portal. The body of the message is plain text. See Creating custom email messages for the portal.
SendEmailAsHtml Sends custom email messages from the portal. The body of the message is HTML. See Creating custom email messages for the portal.
SendEmailAsFieldDisplayFormat Sends custom email messages from the portal. The body of the message is a field display format. See Creating custom email messages for the portal.
SessionVariables Persists variables across all pages until a user session ends. See Persistent variables.
SetValue Provides a value for a property or component. See Getting and setting values - data conversions.
ShowMessage

ShowModalMessage

ShowMessage displays a user message without requiring the user to dismiss it. ShowModalMessage displays a message and requires the user to acknowledge it before continuing. See Sending and viewing user messages and diagnostics.