Print      Open PDF Version of Online Help


Previous Topic

Next Topic

Adding Action Links to Analyses

You can add action links to an analysis. You can use action links to access record detail pages by clicking links on records in analyses available in the Analytics tab. You add action links using the following methods:

  • Using Action Links that invoke a Browser Script. Using this method, you can configure the record type name in the report as an action link. The Action Link script takes the Row ID value in the report, and uses it to retrieve the specific record from Oracle CRM On Demand. You can use this method for the following record types only: Account, Activity (Appointment and Task), Campaign, Contact, Custom Object 01 through Custom Object 40, Lead, Opportunity, Opportunity Product Revenue, Partner, Service Request, Solutions, and User.
  • Using URLs. Using this method, you can create links to any record type from a table or pivot table view. You can configure the record type ID column as an action link.

    NOTE: If users click an action link on a page that has a dynamic layout, then the links are displayed with the standard layout for that page.

About Record Type Names in Action Links

When you add an action link, you must use the original record type name in the code or URL that adds the link. If your company administrator has changed the names of record types in Oracle CRM On Demand, you must determine the original name of the record type where you want to add the link.

For example, your company administrator might have renamed the Account record type so that is now called the Customer record type. If you want to add an action link to a result for the Customer record type, the action link that invokes a Browser Script or URL must refer to the Account record type (that is, the original name of the record type). The values for the Record Type and Row Id parameters for the action link for the renamed Customer record type are shown in the following table.

Name

Prompt

Value

Record Type

Record Type

Account

Row Id

Row Id

"Account.Account ID"

The record type name must be spelled correctly. However, the field is case insensitive.

TIP: For most record types, you can determine the original name of the record type for which you want to add a link, by opening the Homepage for the record type. The URL in the Address field in your browser window shows the original name of the record type. In the example where the Account record type was renamed to Customer, the Customer Homepage shows the following URL:
https://server_name/OnDemand/user/AccountHomePage
where:
server_name is the URL used for signing in to Oracle CRM On Demand.

However, for a Custom Object record type, do not enter the record type name as it appears in the URL for the Custom Object Homepage. Instead, enter the record type name in the format Custom Object 01, Custom Object 02, Custom Object 03, and so on. For the Service Request record type, enter Service. For the Opportunity Product Revenue record type, enter Revenue.

When adding an action link for the renamed Customer record type (originally the Account record type) using a URL, use the Account record type name in the URL, as shown in the following example:

"@[html]"<a target=_top href=/OnDemand/user/AccountDetail?OMTGT=AccountDetailForm&OMTHD=AccountDetailNav&AccountDetailForm.Id="@">"@"</a>

NOTE: The examples of code for action links in this topic might appear across more than one line due to length. The code for an action link must be entered as one line. If you copy and paste a code example from this topic, then the code might contain line breaks. You must delete any line breaks that occur in the code.

TIP: To determine the correct URL for the Detail page for a record type, open the Detail page for any record of that record type. In the Address field in your browser window title bar, copy the relevant part of the address string, from /OnDemand to Id=. In the example where the Account record type was renamed to Customer, the URL is copied from the Detail page of a Customer record.

In some cases, the full record type name is used in all places in the URL for a record type detail page, as is the case with the URL shown in the preceding example. However, in other cases, an abbreviated version of the record type name is used in certain locations in the URL.

For example, if the record type for which you are adding the link was originally the Opportunity record type, the code for the link is as follows:

"@[html]"<a target=_top href=/OnDemand/user/OpportunityDetail?OMTGT=OpptyDetailForm&OMTHD=OpportunityDetailNav&OpptyDetailForm.Id="@">"@"</a>

It is recommended that you use a relative URL rather than an absolute URL in the code for a link.

To add action links using an Action Link that invokes a Browser Script

  1. In Oracle CRM On Demand Analytics, in the Criteria tab, add the columns to the report.
  2. You must add the record type ID field (for example, Account ID) to the report. It is mandatory to have the record type ID field as that will be used to determine which record to navigate to. This column can be hidden if needed but not mandatory as described below:
    1. Click the Column Properties button for the record type ID column.
    2. In the Column Properties dialog box, click the Column Format tab.
    3. In the Column Format tab, select the Hide this column check box, and click OK.
  3. In the Criteria tab, click the Column Properties button for the record type column on which action link is being created.
  4. In the Column Properties dialog box, click the Interaction tab.
  5. In the Interaction tab, select Action Links from the drop-down menu for Primary Interaction under Value.
  6. Click the Add Action Link icon.
  7. In the New Action Link popup that appears, click the Create New Action icon and select Invoke a Browser Script from the drop-down that appears.
  8. In the Create New Action popup window, click Browse and select USERSCRIPT.ActionLink as the Function Name, and then click OK.
  9. In the Parameters section:
    1. For Record Type, in the value column, enter the name of the record type for which the Analysis is being created (for example Account). Select the Fixed and Hidden check boxes as this value will be the same throughout the analysis and doesn't need to be entered again. The record type name must be one of the following: Account, Appointment, Campaign, Contact, Custom Object 01, Custom Object 02, Custom Object 03, and so on, up to and including Custom Object 40, Lead, Opportunity, Partner, Revenue, Service, Solutions, Task, User.
    2. For the Row Id, select Column Value from the drop-down menu and select the corresponding Object ID column that you had added in the earlier step while defining the criteria. Select the Fixed and Hidden check boxes for this row too as this value remains unchanged throughout the report and doesn't need to be entered again. (For example select "Account.Account ID" from the drop-down for Column values.)
    3. Click OK, and then click OK again.
  10. In the Column Properties window, select the check box for Do not display in a popup if only one action link is available at runtime.
  11. Click OK.
  12. To display the report, click the Results Tab.

The following procedure describes how to add action links using URLs. You can use this procedure to add action links for any record type.

Before you begin. To perform this procedure, your user role must include the Analytics Scripting privilege.

To add action links using URLs

  1. In Oracle CRM On Demand Analytics, in the Criteria tab, add the columns to the report, including the record type ID (for example, Account ID) column.

    NOTE: For the action link to work, you must add the record type ID field to the report.

  2. Click the Column Properties button for the record type ID column.
  3. In the Column Properties dialog box, click the Data Format tab.
  4. In the Data Format tab, do the following:
  5. Select the Override Default Data Format check box.
  6. In the Treat Text As list, select Custom Text Format.
  7. In the Custom Text Format field, enter the code for the link after the at sign (@), as shown in the following example:

    "@[html]"<a target=_top href=/OnDemand/user/OpportunityDetail?OMTHD=OpportunityDetailNav&OMTGT=OpptyDetailForm&OpptyDetailForm.Id="@">"@"</a>

    In the preceding example, the URL is for the Opportunity record type. Use the appropriate URL for the record type for which you are creating the link.

    NOTE: Remember that you must use the original record type name in the URL.

    Oracle CRM On Demand Analytics replaces the final at sign (@) in the string with the value of the record type ID for each record in the report. If you do not want the link to display the record type ID, replace the final at sign (@) with the text that you want to be displayed. In the following example, the ID in the action link will be replaced with the word View:

    "@[html]"<a target=_top href=/OnDemand/user/OpportunityDetail?OMTHD=OpportunityDetailNav&OMTGT=OpptyDetailForm&OpptyDetailForm.Id="@">View</a>

  8. Click OK.
  9. To preview the Analysis, click Show how results will look on a Dashboard.

The following example shows the code to use for a link on an asset record:

"@[html]"<a target=_top href=/OnDemand/user/AssetDetail?OMTHD=AssetDetailNav&OMTGT=AssetDetailForm&AssetDetailForm.Id="@">"@"</a>

The following example shows the code to use for a link on an appointment record:

"@[html]"<a target=_top href=/OnDemand/user/ApptDetail?OMTHD=ApptRead&OMTGT=ApptDetailForm&ApptDetailForm.Id="@">"@"</a>

The following example shows the code to use for a link on a task record:

"@[html]"<a target=_top href=/OnDemand/user/TaskDetail?OMTHD=ReadTaskDetail&OMTGT=TaskDetailForm&TaskDetailForm.Id="@">"@"</a>


Published 6/21/2021 Copyright © 2005, 2021, Oracle and/or its affiliates. Legal Notices.