SP.WebParts.WebPartDefinitionCollection.getById Method (sp.js)
Returns the Web Part definition object in the collection with a Web Part identifier equal to the id parameter.
Applies to: apps for SharePoint | SharePoint Foundation 2013 | SharePoint Server 2013
SP.WebParts.WebPartDefinitionCollection.getById(id)
Parameters
id
Type: SP.GuidThe Web Part identifier of the Web Part definition to retrieve.
Exceptions
System.ArgumentOutOfRangeException
There is no SP.WebParts.WebPartDefinition object in the collection with a Web Part identifier equal to the id parameter. Error code: -2146233086.
Return value
Returns a SP.WebParts.WebPartDefinition.
Remarks
All WebPartDefinition objects must have a unique value for their Id property.