Default recruiter field based on country in redwood page using VBCS
Summary:
We need to default the recruiter field based on the selected country on the Redwood page. We attempted to implement this using VBCS with Business Unit and Country fields, but it is not working. Could you please advise if this can be achieved?
Example:
/* eslint-disable dot-notation */
define([], () => {
'use strict';
function getRecruitingJobRequisitionRecruiterAssignmentId(context) {
const { $fields } = context;
const businessUnit = $fields.RecruitingJobRequisition.CountryCodes.$value();
if (!businessUnit) {
return '300000047018742';
}
if (businessUnit === 'US BU') {
return '300000047018742';
}
else if (businessUnit === 'MS MED US BU') {
return '300000049297853';
}
else if (businessUnit === 'Europe BU') {
return '300000047018744';
}
else if (businessUnit === 'APAC BU') {
return '300000047018745';
Tagged:
0