Oracle CRM On Demand JavaScript API Developer's Guide > JavaScript API Reference >

Methods for the ListRow Object


Table 8 describes the methods that are available for the ListRow object. These methods are used for color coding in lists:

Table 8. Methods and Properties for the ListRow Object
Method Name
Return Type
Description
Sample Code
Notes

setColor(JSON Object)

this

Sets the colors for the row by passing in a JSONObject.

listRow.setColor({"rowBgColor":"Black"});

Elements supported in the JSONObject:

  • rowBgColor. The row's background color.

Any other elements are ignored.

For information about the values the element can have, see Color Values for JSONObjects.

getColor()

JSONObject

Returns the row's RGB value in a JSONObject.

color = listRow.getColor();

The getColor() method always returns the row's background color in RGB values or "transparent".

getField(fieldname)

Field

Returns a specific field object in the row based on the field name.

listRow.getField("Account Name");

The only methods of the Field object available when used in a list are:

  • getValue()
  • setColor() and getColor() but labelBgColor and labelTextColor do not apply.

For more information about these methods, see Table 5.

rowNum

N/A

Property containing the row number.

if (row.rowNum == 0){

row.setColor(...);

 

None

getId()

String

Returns the row ID of the record in a row in a list on the screen.

Related item lists are also supported.

oraclecrmod.getList().getRow(0).getId();

In some related item lists, for example, for Account Contact, getRow(#).getId() returns the intersection row ID. In this case, to get the ID of the actual contact associated to the account through the Contact child list, you must call getRow(#).getField ("Contact Full Name").getId();

commitValues(callback)

JSONObject in callback

Commits field values set on list pages using the setValue() method

oraclecrmod.getList("AccountList").getRow(0).commitValues(callback);

For information about the callback handler, see Callback Handler for the commitValues() Method

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