Is there a way to get the list of fields on a record using an expression?

Certified Lead Developer

Is there a way to get the list of fields on a record using an expression? See example below on potential usage.

a!forEach(
  items: 'recordType!{SYSTEM_RECORD_TYPE_USER}User'.fields,
  expression: fv!item
)

If this is not currently supported it would be a great addition that would open up many interesting use cases.

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to Stefan Helzle

    Hi Stefan,

    Thanks for the response. Yes, I am familiar with that plugin. I would however like to make use of the latest record features instead if possible, i.e. custom fields and relationships on synced records. Yes, we have a use case that would benefit from accessing the record fields dynamically.

    I don't believe it is currently possible but thought I would put the question out there in any case. I do have a workaround although not ideal, i.e. create an expression rule that returns a list of record type field references explicitly. For example.

    {
      'recordType!{SYSTEM_RECORD_TYPE_USER}User.fields.{firstName}firstName',
      'recordType!{SYSTEM_RECORD_TYPE_USER}User.fields.{lastName}lastName'
    }

    Kind Regards,

    Philip Snyman

Children