• Gets a SDM record in a store with a specific id. The type of the record should be passed as a generic template to be type safe.

    Example

    import { Sdm } from '@showpad/experience-app-sdk'

    interface MyRecordType {
    field1: number
    field2: string
    }

    const record = await Sdm.getRecordById<MyRecordType>('<sdmStoreId>', '<id>')

    Type Parameters

    • T extends JsonObject

    Parameters

    • sdmStoreId: string
    • id: string

    Returns Promise<SdmRecord<T>>

    The SDM record if found, and null if not found

Generated using TypeDoc