Oracle CRM On Demand Desktop Administration Guide > Administering Oracle CRM On Demand Desktop >

Configuring Web Mashups Controls


A mashup describes a Web application that combines multiple services into a single application. Any Web page can be interactively exposed through Microsoft Outlook's form using Oracle CRM On Demand Desktop controls. The example in this procedure shows how to display a Google Maps location in an Account form that is driven by an address record in the Account form.

To configure Web mashup controls

  1. Add the Web page control to the Account form by doing the following:
    1. Use an XML editor to open the forms_xx.xml file. Add cross reference here.
    2. Navigate to the SBL Account form.
    3. Add the following:

    <web_page id="web_page_view">
    <url>http://www.maps.google.com/</url>
    </web_page>

  2. In the forms.js file, find the following:

    var current_form = new forms.account_form(forms.create_form_ctx(ctx));

  3. Create a script and add below the line found in Step 2:

    function GetPrimaryAddressURL()
    {
        var params = [];
        var url = "http://maps.google.com/?";

        if(ctx.form.item["Primary Address Id"] != null)
        {
           var item = ctx.session.open_item(ctx.form.item["Primary Address Id"]);
           if(item != null)
           {
             if((item["Street Address"]).length > 0)
                params.push( (item["Street Address"]).replace(" ", "+") );
             if((item["City"]).length > 0)
                params.push( (item["City"]).replace(" ", "+") );
             if((item["Country"]).length > 0)
                params.push( (item["Country"]).replace(" ", "+") );
             if((item["State"]).length > 0)
                params.push( (item["State"]).replace(" ", "+") );
           }
        }

        if(params.length > 0) url += "&q=" + params.join(",+");
        else url += "&z=1";
        return url;
    }

  4. Add the following to the forms.js file, in the Account Controls section:

    ctx.form.web_page_view.navigate = GetPrimaryAddressURL();

Oracle CRM On Demand Desktop Administration Guide, Version 5.2 Copyright © 2017, Oracle and/or its affiliates. All rights reserved. Legal Notices.