docs: public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption)
      { // Read a valid record
          int iErrorCode = DBConstants.NORMAL_RETURN;
          switch (iChangeType)
          {
              case DBConstants.DELETE_TYPE:
                  m_recDependent = this.getSubRecord();
                  if (m_recDependent != null)
                  {
                      try {
                          if (!m_bRemoveSubRecords)
                          {
                              m_recDependent.close();
                              if (m_recDependent.hasNext())
                              {   // Error - Can't delete the main record if there are sub-records.
                                  org.jbundle.model.Task task = null;
                                  if (this.getOwner() != null)
                                      if (this.getOwner().getRecordOwner() != null)
                                          task = this.getOwner().getRecordOwner().getTask();
                                  String strError = "Sub-File Not Empty";
                                  if (task != null)
                                  {
                                      strError = ((BaseApplication)task.getApplication()).getResources(ResourceConstants.ERROR_RESOURCE, true).getString(strError);
                                      return task.setLastError(strError);
                                  }
                                  return DBConstants.ERROR_RETURN;
                              }
                          }
                          else
                          {
                              m_recDependent.close();
                              while (m_recDependent.hasNext())
                              {
                                  m_recDependent.next();
                                  m_recDependent.edit();
                                  m_recDependent.remove();
                              }
                          }
                      } catch (DBException ex)    {
                          ex.printStackTrace();
                      }
                  }
                  break;
          }
          if (iErrorCode != DBConstants.NORMAL_RETURN)
              return iErrorCode;
          return super.doRecordChange(field, iChangeType, bDisplayOption);   // Initialize the record
      }