Jam.py documentation

each_field

each_field(function(field))

domain: client

language: javascript

class Item class

Description

Use each_field method to iterate over fields owned by an item.

The each_field() method specifies a function to run for each field (the current field is passed as a parameter).

You can break the each_field loop at a particular iteration by making the callback function return false.

Example

function customer_fields(customers) {
    customers.open({limit: 1});
    customers.each_field(function(f) {
        console.log(f.field_caption, f.display_text);
    });
}

Fields

Field class