0

Getting the error below but the rental object does not have any validation rules.

try {
  upsert ren;
  createbill(ren);
}
catch (DMLException exc) {
  System.debug('exc '+exc.getMessage());
}

Error:

Unable to save the Rental Ref: System.DmlException: Upsert failed. First exception on row 0 with id zoR0000003IjEEEE0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, {"DesignDetailsComponent":{"fieldName":null,"errorMessage":"You must have one design.","componentName":"DesignDetailsComponent"}}: []

  • 2
    (1) That exception can come from a trigger too, and the phrasing suggests to me it's likely; (2) catching and swallowing (log only) exceptions is a bad code pattern. – David Reed Jun 18 at 22:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.