Salesforce

Accessing Collection Items (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

Accessing Collection Items (Magic xpa 4.x)

Some COM objects are a collection of other COM objects. For example, a Documents object is a collection of multiple Document objects. A collection item is usually retrieved by an ID field. Sometimes the ID of a collection item is not a sequentially enumerated identifier (i.e. 1,2,3...,n) and therefore there is no direct way to retrieve all the items one by one (like the "For Each" statement in other programming languages). The Invoke COM operation adds a special internal method called MGItemSequential, which is not part of the object's methods, and enables accessing the collection's items as if they are ordered in an array. The MgItemSequential method accepts an index of the item to retrieve. The index range is between 1 and the count of items in the collection.

Reference
Attachment 
Attachment