Oracle CRM On Demand JavaScript API Developer's Guide > JavaScript API Reference > Methods for CRUD Operations >

Parameters and Return Values for CRUD Methods


The following are the parameter values for the CRUD methods listed in Table 11:

  • objectName. The name of the record type, for example, "Account"
  • fieldNames (for readRecord). A list of business component field names for which values are returned. You can specify the list of fields as a comma-separated string, or as an array. For example, the string:

    "Name, Location, Type, Description"

    or the array:

    ["Name", "Location", "Type", "Description"]

  • fieldNameValuePairs (for createRecord and updateRecord). An object containing field name-value pairs. For example:

    {"Name" : "Account 1", "Account Contact Role" : "Admin", "Type" : "Customer", "Description" : "Description Test"}

    For create operations, if a required field is missing, then the operation fails. Read-only fields are ignored. For update operations, if a required field is missing a value, then the operation fails. Attempts to populate read-only fields are ignored.

  • readParameters, updateParameters, deleteParameters. A search type and search specification. For example:

    { searchType: rowId, rowId: "1QA2-TNRWW"}

    You can also specify just a string, which by default means search by row ID, for example:

    "1QA2-TNRWW"

    NOTE:  Only row ID values are supported for the searchType parameter. To retrieve all searchable fields, you can use the REST API instead. Note that the REST API uses integration tag names rather than the HTML field tag names used by the JavaScript API. For more information, see Oracle CRM On Demand REST API Developer's Guide.

  • createParameters. A value for a parameter reserved for future use. Specify the value null.
  • callback. A user-defined function to process the results of the CRUD operations. For more information, see User-Defined Callback Function.

All of the CRUD methods return a JSONObject object, which has the following properties:

  • status. The status as a string: "OK" or "ERROR".
  • errors. Any errors in a JSONArray object. The format of the error object returned is as follows:

    [Object {Code="MSG_NUM", Message="MSG_TEXT"}]

  • fieldNameValuePairs. A list of the field names and values in a JSONArray object. The format of the object is as follows or null:

    [Object { Name="Account Val", Location="Location Val", Type="Partner", more...}]

Oracle CRM On Demand JavaScript API Developer's Guide, Release 38 Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Legal Notices.