How to clear the field in the VBS defaulting rule in JS code?
Summary:
How to clear the field in the VBS defaulting rule in JS code?
Content (please ensure you mask any confidential information):
Hi experts,
I am trying to migrate the autocomplete field modification rules to VBS. This is extremely challenging. I would say mostly impossible.
I would suggest sharing the experience on this.
I am faced with the following issues and have questions to ask:
- How is it possible to clear a field value in the advanced expression of the defaulting rule
Below is the code:
/* eslint-disable dot-notation */
define([], () => {
'use strict';
/**
* Default value expression for employmentAssignments.assignmentsDFF.iPayBuChar
* @param {object} context
* @return {string}
*/
function getEmploymentAssignmentsAssignmentsDFFIPayBuChar(context) {
const { $fields } = context;
const l4 =
$fields.employmentAssignments.departmentsLov.departmentsDFF.l4.$value();
const dc =
$fields.employmentAssignments.departmentsLov.departmentsDFF.iDepartmentCode.$value();
const legalEntity =
$fields.employmentAssignments.legalEntitiesLov.Name.$value();
console.log('DEFAULTING start...');
console.log('Legal Entity:', legalEntity);
console.log('L4:', l4);
0