Something like this
const fieldChanged = (context) => {
const fieldId = context.fieldId;
const record = context.currentRecord;
if (fieldId === 'your_trigger_field_id') { // Replace with your trigger field's ID
try {
// Focus on a field in the target tab
const targetFieldId = 'your_target_field_id'; // Replace with your target field's ID
const field = record.getField({
fieldId: targetFieldId
});
if (field) {
jQuery('#' + fi
eld.id).focus(); // Using jQuery to focus on the field
}
} catch (e) {
log.error({
title: 'Error setting focus to field',
details: e.message
});
}
}
}