Cannot apply operator [EQUALS] to field [id] when comparing to value

Certified Associate Developer

I have a record picker that works perfectly and saves a contact id to ri!contact.

I am trying to retrieve the contactEmail but am receiving an error.

If I replace value: ri!contact with an actual number it retrieves an email address without an error.  My ri!contact is type interger.

Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error [evaluation ID = CI0JZI1L] : An error occurred while executing a save: Expression evaluation error at function a!queryEntity [line 74]: Cannot apply operator [EQUALS] to field [id] when comparing to value [TypedValue[it=3,v=1619]].

a!pickerFieldRecords(
label: "Site Contact:",
labelPosition: "ADJACENT",
maxSelections: 1,
recordType: 'recordType!{a51a96ca-d73b-4c5e-828b-7c08c9505973}vvaSADContactVIEW_FINALFINAL',
filters: a!queryFilter(
field: 'recordType!{a51a96ca-d73b-4c5e-828b-7c08c9505973}vvaSADContactVIEW_FINALFINAL.fields.{locationId}locationId',
operator: "=",
value: ri!location),
value: ri!contact,
saveInto: {
a!save(ri!contact, save!value),
a!save(
ri!contactEmail,
a!queryEntity(
entity: cons!vvaSADContactView,
query: a!query(
selection: a!querySelection(columns: { a!queryColumn(field: "contactEmail") }),
logicalExpression: a!queryLogicalExpression(
operator: "AND",
filters: {
a!queryFilter(
field: "id",
operator: "=",
value: ri!contact
)
}
),
pagingInfo: a!pagingInfo(startIndex: 1, batchSize: - 1)
),
fetchTotalCount: false()
).data.contactEmail[1],
)},
showWhen: ri!location >= 0,
required: true,
validations: {}
),

  Discussion posts and replies are publicly visible

Parents Reply Children