Using a record type where source is a database view into Records Chat Component

Certified Lead Developer

Hi Everyone,

We have a way to use a Record type designed to have a database view as data source into a Records Chat Component?

local!data: a!queryRecordByIdentifier(
    recordType: 'MY RECORD WITH DATABASE VIEW AS SOURCE HERE',
    identifier: ri!id
),
a!recordsChatField(
  recordType: 'MY RECORD WITH DATABASE VIEW AS SOURCE HERE',
  identifier: ri!id,
  height: "TALL",
  initialMessage: concat(
    "For this instance of ",
    local!data['MY RECORD WITH DATABASE VIEW AS SOURCE HERE.fields.{processName}processName'],
    " process, I have the following data available: "
  ),
  suggestedQuestions: {
    concat(
      "When this instance was created?"
    ),
    concat(
      "What is the instance deadline?"
    ),
    concat(
      "What is the process version of ",
      local!data['MY RECORD WITH DATABASE VIEW AS SOURCE HERE.fields.{processName}processName'],
      " instance?"
    )
  },
  fields: {
    'MY RECORD WITH DATABASE VIEW AS SOURCE HERE.fields.{instanceId}instanceId',
    'MY RECORD WITH DATABASE VIEW AS SOURCE HERE.fields.{processVersion}processVersion',
    'MY RECORD WITH DATABASE VIEW AS SOURCE HERE.fields.{processCode}processCode'
  },
  relatedRecordData: {}
)

Using the code above, i'm getting the following chat message:

  Discussion posts and replies are publicly visible