• JMap.Attachment.getByItemId

    Fetches every attachment linked to a specific item (row) of a data source.

    Parameters

    • dataSourceId: JId

      the data source identifier that contains the item

    • itemId: JId

      the identifier of the item whose attachments you want

    Returns Promise<JAttachment[]>

    Example

    JMap.Attachment
    .getByItemId("f47ac10b-58cc-4372-a567-0e02b2c3d479", 7088)
    .then(attachments => console.log("Attachments found:", attachments.length))
    .catch(error => console.error("An error occurred while fetching attachments", error))