i2 Connect SDK
Search results for

    Show/hide table of contents

    Home > @i2analyze/i2connect > Result > addLinkWithSourceIdentifier

    Result.addLinkWithSourceIdentifier() method

    Adds a new link record to the result, whose identifier is a source identifier that you create.

    Signature:

    addLinkWithSourceIdentifier<TLinkType extends schema.ILinkType, TFromEnd extends records.ISeededResultEntityRecord | records.IResultEntityRecord<schema.IEntityType, records.ResultRecordId> | records.IResultEntityRecord<schema.IEntityType, records.ISourceIdentifier>, TToEnd extends records.ISeededResultEntityRecord | records.IResultEntityRecord<schema.IEntityType, records.ResultRecordId> | records.IResultEntityRecord<schema.IEntityType, records.ISourceIdentifier>>(type: TLinkType, id: records.ISourceIdentifier, fromEnd: TFromEnd, toEnd: TToEnd, direction?: data.LinkDirection): records.IResultLinkRecord<TLinkType, TFromEnd, TToEnd, records.ISourceIdentifier>;
    

    Introduced: API version 1.0

    Type Parameters

    Parameter Type Description
    TLinkType extends schema.ILinkType The type of the new link record.
    TFromEnd extends records.ISeededResultEntityRecord | records.IResultEntityRecord<schema.IEntityType, records.ResultRecordId> | records.IResultEntityRecord<schema.IEntityType, records.ISourceIdentifier> The type of the entity record at the "from" end of the link.
    TToEnd extends records.ISeededResultEntityRecord | records.IResultEntityRecord<schema.IEntityType, records.ResultRecordId> | records.IResultEntityRecord<schema.IEntityType, records.ISourceIdentifier> The type of the entity record at the "to" end of the link.

    Parameters

    Parameter Type Description
    type TLinkType The link type of the new record.
    id records.ISourceIdentifier A source identifier for the new record.
    fromEnd TFromEnd The entity record for the "from" end of the link, which was previously returned from Result.addEntity() or Result.addEntityFromSeed().
    toEnd TToEnd The entity record for the "to" end of the link, which was previously returned from Result.addEntity() or Result.addEntityFromSeed().
    direction data.LinkDirection The direction of the new link record, which defaults to "none".

    Returns:

    records.IResultLinkRecord<TLinkType, TFromEnd, TToEnd, records.ISourceIdentifier>

    The link record that was added to the result.

    In this article
    Back to top © N. Harris Computer Corporation (2022)