Home > @i2analyze/i2connect > services > IResult > addEntity
services.IResult.addEntity() method
Adds a new entity record to the result, whose identifier is a string that you provide.
Signature:
addEntity<TEntityType extends schema.IEntityType>(type: TEntityType, id: records.ResultRecordId): records.IResultEntityRecord<TEntityType, records.ResultRecordId>;
Introduced: API version 1.0
Type Parameters
Parameter | Type | Description |
---|---|---|
TEntityType | extends schema.IEntityType | The type of the new entity record. |
Parameters
Parameter | Type | Description |
---|---|---|
type | TEntityType | The entity type of the new record. |
id | records.ResultRecordId | An identifier for the new record. |
Returns:
records.IResultEntityRecord<TEntityType, records.ResultRecordId>
The entity record that was added to the result.
Remarks
The identifier that you provide needs to be unique only for entities of the specified type, from the connector that owns the service.