Add a field to a form using a script

function empLocationSearch(currentEmpID) { try { var employeeSearchObj = search.create({ type: “employee”, filters: [ [“internalid”, “anyof”, currentEmpID], “AND”, // [“location”,”anyof”,”29″] [“isinactive”, “is”, “F”], ], columns: [ search.createColumn({ name: “internalid”, label: “Internal ID” }), search.createColumn({ name: “location”, label: “Location” }) ] }); var searchResultCount = employeeSearchObj.runPaged().count; log.debug(“searchResultCount”, searchResultCount) let location if (searchResultCount > 0) { employeeSearchObj.run().each(function (result)… Continue reading Add a field to a form using a script