Methods for the ListRow Object

The following table describes the methods that are available for the ListRow object. These methods are used for color coding in lists:

Table Methods and Properties for the List Row Object

Method Name Return Type Description Notes Sample Code

setColor(JSON Object)

this

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

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.

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

getColor()

JSONObject

Returns the row’s RGB value in a JSONObject.

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

color = listRow.getColor();

getField(fieldname)

Field

Returns a specific field object in the row based on the field 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 the table in Methods for the Field Object.

listRow.getField("Account Name");

rowNum

N/A

Property containing the row number.

None

if (row.rowNum == 0){
row.setColor(...);

getId()

String

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

Related item lists are also supported.

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();

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

commitValues(callback)

JSONObject in callback

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

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

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