I have an Employee CDT and Documents CDT(One to many Relation Ship between them) documents table has foreign key empId ,i wanted to get the documents based on empId (foreign key)
if i write expression like
a!queryEntity( entity: cons!DOCUMENTS_DETAILS, query: a!query( pagingInfo: a!pagingInfo( startIndex: 1, batchSize: - 1 ), filter: a!queryFilter( field: "empId"( as foreign key in documents table but empId field is not there in Documents CDT), operator: "in", value:7 ) ) ).data
so i am getting following error The field [empId] does not exist.. in such case how to get the nested CDT Data.
Discussion posts and replies are publicly visible
hi kiran,
a!queryEntity(
entity: cons!EMP_DETAILS,(constant which refers employee entity )
query: a!query(
pagingInfo: a!pagingInfo(
startIndex: 1,
batchSize: - 1
),
filter: a!queryFilter(
field: "empId",
operator: "in",
value:7
)
).data
by above entity you will get employee details
then do index(local!employeeData,"documents",{})
where local!employeeData (data from above query entity )
documents is a filed name of nested cdt in employee table.