Print      Open PDF Version of Online Help


Previous Topic

Next Topic

Adding Action Links to Results

You can add action links to results. Action links allow users to access record detail pages by clicking links on records in reports. You add action links using the following methods:

  • Using Action Link classes. Using this method, you can configure the record type name in the report as an action link. The Action Link class 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: Account, Campaign, Contact, Lead, Opportunity, Service Request, 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 Action links 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 link code or URL must refer to the Account record type (that is, the original name of the record type). Depending on the type of link that you want to create, use the record type name in your code or URL as follows:

  • When adding an action link for the Customer record type (originally the Account record type) using Action Link classes, use the account record type name in the link code, as shown in the following example:

    [html]"<a onClick=\"javascript:LinkOccam (this, 'account');\">"@"</a>"

    When you add action links using Action Link classes, the record type name must be all lowercase letters in the link code.

    TIP: To determine the original name of the record type for which you want to add a link, open 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

  • When adding an action link for the 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:

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

    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 http 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 URL is as follows:

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

The following procedure describes how to add action links using Action Link classes.

To add action links using Action Link classes

  1. In Oracle CRM On Demand Answers, in the Define Criteria page, add the columns to the report.

    You must add the record type name field (for example, Account Name) and the record type ID field (for example, Account ID) to the report, and you must place the ID field immediately to the right of the name field in the report layout.

  2. Click the Column Properties button for the record type ID column.
  3. In the Column Properties dialog box, click the Column Format tab.
  4. In the Column Format tab, select the Hide this column check box, and click OK.
  5. In the Define Criteria page, click the Column Properties button for the record type Name column.
  6. In the Column Properties dialog box, click the Style tab.
  7. In the Style tab, do the following:
    1. Expand the Custom CSS Style Options (HTML Only) area by clicking the plus (+) icon.
    2. Select the Use Custom CSS Class check box, and type ActionLink in the text box.
  8. Click the Data Format tab.
  9. In the Data Format tab, do the following:
    1. Select the Override Default Data Format check box.
    2. In the Treat Text As list, select Custom Text Format.
    3. In the Custom Text Format field, type text similar to the following example after the at sign (@).

      In this example, an action link is created for an account:

      [html]"<a onClick=\"javascript:LinkOccam (this, 'account');\">"@"</a>"

      To create an action link for one of the other record types that supports action links created with Action Link Classes, replace the word account in the preceding example with campaign, contact, lead, opportunity, service, or user, as appropriate. The record type name must be all lowercase letters.

      NOTE: You must use the original record type name in the link code. If your company administrator has renamed the record types in Oracle CRM On Demand, you must determine the original name of the record type where you are adding the action links, and use that name in the link code.

  10. Click OK.
  11. To preview the report, click Preview Analysis.

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

To add action links using URLs

  1. In Oracle CRM On Demand Answers, in the Define Criteria page, 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:
    1. Select the Override Default Data Format check box.
    2. In the Treat Text As list, select Custom Text Format.
    3. In the Custom Text Format field, enter the code for the link after the at sign (@), as shown in the following example:

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

      where:

      server_name appears in the example, substitute the URL that you use to sign in to Oracle CRM On Demand.

      In the preceding example, the URL is for the Opportunity record type. Use the appropriate URL for your Oracle CRM On Demand server and the record type for which you are creating the link.

      NOTE: You must use the original record type name in the URL. If your company administrator has renamed the record types in Oracle CRM On Demand, you must determine the original name of the record type where you are adding the action links, and use that name in the URL.

      Oracle CRM On Demand Answers 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:

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

  5. Click OK.
  6. To preview the report, click Preview Analysis.

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

"http://"@[html]"<a target=_top href=https://server_name/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:

"http://"@[html]"<a target=_top href=https://server_name/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:

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


Published 1/9/2017 Copyright © 2005, 2017, Oracle. All rights reserved. Legal Notices.