Build a VBS Validation Rule for the Default Expense Account
Summary:
Build a VBS Validation Rule for the Default Expense Account in the Convert Pending Worker redwood flow
Content (please ensure you mask any confidential information):
We are trying to build a VBS validation rule in the Convert Pending Worker redwood flow to make sure that the length of the Default Expense Account field in the Assignment section is 40 Character only.
Below Validation Rule is being built:
below is the code used to build the condition:
/* eslint-disable dot-notation */
define([], () =>
{
'use strict';
/**
*
* @param {object} context
* @return {boolean}
*/
function runCondition(context)
{
const { $componentContext, $fields, $modules, $user } = context;
let DefaultExpenseAccountValue = $fields.addPersonWorkRelationships.DefaultExpenseAccount.$value(); 0