Oracle CRM On Demand Desktop Administration Guide > Customizing Oracle CRM On Demand Desktop > Process of Customizing Objects in Oracle CRM On Demand Desktop >

Adding Custom Logic


This task is a step in Process of Customizing Objects in Oracle CRM On Demand Desktop.

To improve usability, sometimes you must add custom logic to Oracle CRM On Demand Desktop. Oracle CRM On Demand Desktop allows you to manipulate Microsoft Outlook data, for example, you can do the following:

  • Automatically include the ID of the current user in the Owner field.
  • Cause the first letter of each word in the description of an activity to automatically capitalize.
  • Change the state of some controls, for example, to inform the user that the control is required.

To add custom logic

  1. Use an XML editor to open the forms_12.xml file.

    For more information, see Files in the Customization Package.

  2. To add the custom logic for this example, add the following code:

    <form id="On Demand Activity"
        <script>
          <![CDATA[
            include("forms.js", "forms");
              var ctx = {
              "application": application,
              "ui": ui,
              "application_script": application_script,
              "form": form
              };
              var current_form = new           forms.activity_form(forms.create_form_ctx(ctx));
          ]]>
        </script>
    ...
    </form>

  3. In forms.js, create the activity_form(ctx){} function.

    This function contains the custom logic.

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