Dialogue Script (or DScript for short) provides a simple scripting language for developing interactive web pages, forms, and applications integrated with Salesforce.com. In this series of articles, I'll cover some basic scripting concepts to address the most common use cases.
Dialogue Script Articles:
What is a Master View?"Recent News" is an example of a Master View. It is simply a list of items that are dynamically queried from Salesforce.
Here's an example Dialogue script that displays a top 5 list of the most recent press releases:
<dlog:repeater id="LatestNewsRepeater" SOQL="SELECT TOP 5 * FROM Content__c WHERE Type__c='Press Release' ORDER BY CreatedDate DESC" runat="server"><ItemTemplate><dlog:HyperLink ID="HeadlineLink" TextFieldName="Headline__c" NavigateURL="~/News.aspx={oid}" runat="Server" /><br/></ItemTemplate></dlog:repeater>Example Output: (example links only)ACME Corp Announces Q1 FinancialsJane Smith Joins ACME as VP of OperationsABC Sees Record Growth After Using ACME SolutionACME Announces 2008 Product RoadmapWall Street Journal: Inside Look at ACME
This example uses a Repeater control and SOQL Plus to query Salesforce and format the repeating layout of each item in the query result. Dialogue Script supports Salesforce Object Query Language (SOQL) plus adds support for tokens like "TOP", "ORDER BY", and "IN".
You can query any object in Salesforce. Master Views and Lists are a great way to provide customers with high level information and get them started in a general direction. Adding an ORDER BY CreatedDate DESC clause ensures the web page always stays up to date and displays the latest press releases, meaning you never need to update your web site when a new press release is launched. Query results can be cached to improve performance by adding a CachedDurationMinutes attribute to the Repeater.
In the next article, I'll demonstrate how to use Dialogue Script to format the actual Press release page using Salesforce data, plus some bonus script on creating a dynamic Google AdWords landing page.
Happy scripting!!!
Remember Me