🧪 Experimental KB — Official knowledge hub: community.kaptio.com

How to resolve 'Required fields are missing: LastName' error when batch deleting Passenger Itinerary Unit Assignments

When batch deleting Passenger Itinerary Unit Assignment (PIUA) records, the operation fails with error: 'Required fields are missing: [KaptioTravel__LastName__c]'. This typically occurs when customers

PIUA batch-delete triggers data-cleanup storage-limits passenger

Problem

When batch deleting Passenger Itinerary Unit Assignment (PIUA) records, the operation fails with error: ‘Required fields are missing: [KaptioTravel__LastName__c]’. This typically occurs when customers need to clean up old data to free up Salesforce storage space.

What We Found

Kaptio core logic recalculates amounts (Total Cost, Total Sell, etc.) on Passenger records every time a Passenger Itinerary Unit Assignment record related to that Passenger is inserted, updated, or deleted. The error occurs because the Kaptio trigger attempts to update the related Passenger records, but some of those Passengers are missing the required LastName field.

Solution

  1. RECOMMENDED: Disable Kaptio triggers before deleting records. Go to Kaptio Settings > User Overrides and disable triggers ONLY for the user performing the deletion. Re-enable triggers immediately after the deletion is complete.
  2. ALTERNATIVE 1: Fill in the LastName field for all affected Passengers before deleting the PIUA records, so the Kaptio trigger can update the Passengers without errors.
  3. ALTERNATIVE 2: Unlink the PIUA records from Passengers before deleting them. This is done by clearing the KaptioTravel__Passenger__c field on the Passenger Itinerary Unit Assignment records first, then deleting them.

Notes

  • This issue commonly occurs when cleaning up historical data (e.g., Itinerary Price Lines and PIUA records pre-dating a certain year) to address Salesforce data storage limits.
  • Option 3 (disable triggers) is recommended when the recalculation of Passenger amounts is not needed, such as when deleting old historical records.
  • The trigger behavior is by design - it ensures Passenger totals stay in sync when PIUA records change.

Warnings

⚠️ When disabling Kaptio triggers via User Overrides, ensure you only disable for the specific user performing the deletion - do NOT disable org-wide. ⚠️ Re-enable triggers immediately after the batch deletion is complete to avoid other data integrity issues.


Source: KHELP-12306

Was this article helpful?