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 or a source identifier that you create.
Signature:
addEntity<TEntityType extends schema.IEntityType>(type: TEntityType, id: records.ResultRecordIdType): records.IResultEntityRecord<TEntityType, records.ResultRecordIdType>;
Introduced: API version 2.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.ResultRecordIdType | An identifier for the new record. |
Returns:
records.IResultEntityRecord<TEntityType, records.ResultRecordIdType>
The entity record that was added to the result.
Remarks
If you provide a string identifier it needs to be unique only for entities of the specified type, from the connector that owns the service.