VBS - Expression returns field value undefined
Summary:
[VBS - Document of Record]
I am trying to populate a field with the person name but it returns undefined when I run preview mode
Content (please ensure you mask any confidential information):
Hello,
I am working on visual builder studio, where I need to autopopulate the field Document Name through an expression.
I want to have in this field :
- The name of the Employee
- The date
My expression is looking like this :
/* eslint-disable dot-notation */define([], () => { 'use strict';
/** * Default value expression for documentRecords.DocumentName * @param {object} context * @return {string} */ function getDocumentRecordsDocumentName(context) { const { $componentContext, $fields, $modules, $user, $value } = context;