Can queryEntity be used to query nested CDTs...

Can queryEntity be used to query nested CDTs...

OriginalPostID-131865

OriginalPostID-131865

  Discussion posts and replies are publicly visible

Parents
  • In terms of queryentity here's an example using that same scenario of the Company with Multiple Office Locations.

    In this example I looking for company with id 1 and returning all its office locations

    a!queryEntity(
    entity: cons!COMPANY_ENTITY_TYPE,
    query: a!query(
    selection: a!querySelection(
    columns: {
    a!queryColumn(
    field: "name"
    ),
                        a!queryColumn(
    field: "locations"
    )
    }
    ),
    filter: a!queryFilter(
    field: "id",
    operator: "=",
    value: 1
    ),
    pagingInfo: a!pagingInfo(
    startIndex: 1,
    batchSize: 1
    )
    )
    ).data.locations
Reply
  • In terms of queryentity here's an example using that same scenario of the Company with Multiple Office Locations.

    In this example I looking for company with id 1 and returning all its office locations

    a!queryEntity(
    entity: cons!COMPANY_ENTITY_TYPE,
    query: a!query(
    selection: a!querySelection(
    columns: {
    a!queryColumn(
    field: "name"
    ),
                        a!queryColumn(
    field: "locations"
    )
    }
    ),
    filter: a!queryFilter(
    field: "id",
    operator: "=",
    value: 1
    ),
    pagingInfo: a!pagingInfo(
    startIndex: 1,
    batchSize: 1
    )
    )
    ).data.locations
Children
No Data