FormDataSource.getNext Method [AX 2012]

Returns the next record that meets the criteria that are set up in an earlier call to the FormDataSource.getFirst method.

public Common getNext()

Run On

Client

Return Value

Type: Common Table
The next record in the dataset.

Depending on the initialization that is performed in the call to the FormDataSource.getFirst method, the getNext method might return only records that have a particular mark value, and it might return records from the cache.

The following example determines whether two records are selected in a form.

boolean twoMarked() 
{ 
    SysVersionControlTmpItem tmpitem  = this.getFirst(1); 
  
    if (!tmpitem) 
    { 
        return false; 
    } 
    tmpitem = this.getNext(); 
  
    if (!tmpitem) 
    { 
        return false; 
    } 
    tmpitem = this.getNext(); 
  
    if (!tmpitem) 
    { 
        return true; 
    } 
    return false; 
}

Community Additions

ADD
Show: