Cubic Compass Software

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:

  1. Master Views and Lists
  2. Details View
  3. Web Form

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 Financials
Jane Smith Joins ACME as VP of Operations
ABC Sees Record Growth After Using ACME Solution
ACME Announces 2008 Product Roadmap
Wall 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!!!

Posted: Sunday, February 03, 2008 3:57:31 AM (GMT Standard Time, UTC+00:00)  #   
Comments [1]  | 

Search