Troubles with record type

Certified Associate Developer

Hello everybody,

I need to create a view using two record type (expense and expenseInfo) that have a field in common (PK and FK)

I have created a query that returns all the information from the two tables using the relation with the id (AT Expense Information) and the idexpensedet (AT Expense).

In the first part I need to show the requester information (That one is ok.)


In the second part of my view I need to populate a Grid ONly Read with all the expense related to the requester. And I don't no know how to do this,

I have tried to test in the grid Only Read (data source: using RULE (call the expression and testing ) and EXPRESSION (with this code) ) it is not working

 

a!queryRecordType(
  recordType: 'recordType!{854cabc5-d20e-4764-95c5-5e0485f3715f}AT Expense Report',
  filters: a!queryFilter(
    field: 'recordType!{854cabc5-d20e-4764-95c5-5e0485f3715f}AT Expense Report.fields.{277d529f-c83c-47ea-a269-f1eec6e4a2d3}idexpensedet',
    operator: "=",
    value: ri!id 
  ),
  pagingInfo: a!pagingInfo(
    startIndex: 1,
    batchSize: 100
  )
   
).data

Could you help me, please?

  Discussion posts and replies are publicly visible

Parents Reply
  • This happens due to the section of the code where you are displaying the grid columns. You are probably doing something like fv!row.id, which would work for a queryEntity. But here you are using a record, so you have to refer to the record fields by the square bracket syntax, as the error message says.

    You have to use something like fv!row['recordType!YOUR_RECORD.fields.Id']

Children