code: public int checkSecurity()
      {
          if ((this.getClass().getName().startsWith(BASE_CLASS)) && (this.getMainRecord() != null))
          {
              App application = null;
              if (this.getTask() != null)
                  application = this.getTask().getApplication();
              int iErrorCode = DBConstants.NORMAL_RETURN; 
              if (application != null)
                  iErrorCode = application.checkSecurity(this.getMainRecord().getClass().getName());    // Check access to main record
              return iErrorCode;
          }
          else
              return super.checkSecurity();   // Custom screen - check security
      }
docs: Does the current user have permission to access this screen.
  @return NORMAL_RETURN if access is allowed, ACCESS_DENIED or LOGIN_REQUIRED otherwise.