Show TOC

Function documentationaddItemEntries Method Locate this document in the navigation structure

 

addItemEntries( itemEntryArray)

Adds an array of ItemEntry objects to an existing collection. By calling this method, you avoid redrawing of the screen after adding each entry.

Parameter

Description

itemEntryArray

An array of ItemEntry objects representing the entries to add

Return Value

A Boolean array, each member of which indicates whether the respective ItemEntry was added successfully:

  • True, if the entry was added

  • False, if the entry was not added because an item with the specified parameters already exists in the specified collection or if the specified collection was not found

Example

Example Example

  1. var firstItem = new LSAPI.Collections.Item(“ID1”, ”Title1”, LSAPI.Collections.Types.OPTIONS_MENU, “Tooltip1”, ”roles://target1”);
    var secondItem = new LSAPI.Collections.Item(“ID2”, ”Title2”, LSAPI.Collections.Types.OPTIONS_MENU, “Tooltip2”, ”roles://target2”);
    var itemEntriesArray = new Array();
    
    itemEntriesArray[0] = new LSAPI.Collections.ItemEntry(firstItem, “parentCollectionID”, “parentItemID”, true);
    itemEntriesArray[1] = new LSAPI.Collections.ItemEntry(secondItem, “parentCollectionID”, “parentItemID”, true);
    var verifySuccesses = LSAPI.Collections.addItemEntries(itemEntriesArray);
    
End of the code.