Home / Questions / In the service class, what is the purpose of ListEnumerator?
Explanatory Question

In the service class, what is the purpose of ListEnumerator?

👁 2 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

ListEnumerator is used to loop through all elements in a List object.
Example:


siteEnum = inventSiteId.getEnumerator();
while (siteEnum.moveNext())
{
    info(strFmt("Selected Site ID: %1", siteEnum.current()));
}

This prints each selected Site ID in the Infolog.