ListEnumerator.moveNext Method [AX 2012]

Determines whether the enumerator denotes a valid list element.

public boolean moveNext()

Run On

Called

Return Value

Type: boolean
true if the current position in the list holds a valid element; otherwise, false.

List enumerators start before the first element in the list. You must call the moveNext method to make it point to the first element in the list.

The following example uses the moveNext method to check whether there is another element in the list and then sets the dimensionTopic variable to the value of the current list element.

public DimensionTopic firstDimensionTopic() 
{ 
    DimensionTopic  dimensionTopic; 
    ListEnumerator  enumerator; 
  
    enumerator = this.getTopicsEnumerator(); 
  
    if (enumerator.moveNext()) 
    { 
        dimensionTopic = enumerator.current(); 
    } 
  
    return dimensionTopic; 
}

Community Additions

ADD
Show: