How to fix it

  1. Navigate to System Import Sets > Administration > Transform Maps and open your problematic transform map.
  2. Click the Field Maps tab and identify any field mappings that use setMandatory() in their transform scripts.
  3. Go back to the transform map record and scroll to the Advanced tab to locate the Script field for onBefore processing.
  4. Add validation logic in the onBefore script. For each required field, add: if(!source.u_your_field || source.u_your_field == '') { ignore = true; info('Skipping record due to missing required field: u_your_field'); }
  5. For multiple required fields, structure it like this:

// Validate required fields
var requiredFields = ['u_field1', 'u_field2', 'u_field3'];
for (var i = 0; i < requiredFields.length; i++) {
var fieldName = requiredFields[i];
if (!source[fieldName] || source[fieldName] == '') {
ignore = true;
info('Skipping record due to missing required field: ' + fieldName);
break;
}
}

  1. Remove or comment out the setMandatory() calls from individual field map scripts since they don't enforce import validation.
  2. Click Update to save the transform map changes.
  3. Test the fix by running a transform with records that have blank mandatory fields. Navigate to System Import Sets > Import Sets and process a test import set.
  4. Check the Import Set Run results - records with missing required fields should show as Ignored with your custom info message in the error log.
⚠️

Using ignore = true will skip the entire record, not just the empty field. If you need partial record processing, consider setting default values instead of ignoring records.

  1. Alternative approach - if you need to set default values instead of ignoring records, modify the onBefore script:

// Set default values for required fields
if (!source.u_required_field || source.u_required_field == '') {
source.u_required_field = 'Default Value';
info('Set default value for u_required_field');
}

  1. If you still need UI-level mandatory enforcement, set the field to mandatory in the Dictionary Entry rather than using setMandatory(). Navigate to System Definition > Dictionary and find your field.
💡

Enable 'Debug transform' in your Import Set to see detailed logging of field validation and ignore decisions during testing.