Home > @i2analyze/i2connect > Result > addEntityFromSeed
Result.addEntityFromSeed() method
Adds an entity record that was passed to the service as a seed to the result.
Signature:
addEntityFromSeed<TEntityType extends schema.IEntityType>(seed: records.ISeedEntityRecord & records.ITypedSeedRecord<TEntityType>): records.ISeededResultEntityRecord & records.ITypedSeededResultRecord<TEntityType>;
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 |
---|---|---|
seed | records.ISeedEntityRecord & records.ITypedSeedRecord<TEntityType> | The record that was passed to the service method as a seed. |
Returns:
records.ISeededResultEntityRecord & records.ITypedSeededResultRecord<TEntityType>
The record that was added to the result.
Remarks
When you want to return a seed entity in your result set, use this method in preference to extracting data from the seed and using Result.addEntity().