/** * Called when a change is the record status is about to happen/has happened. * @param field If this file change is due to a field, this is the field. * @param iChangeType The type of change that occurred. * @param bDisplayOption If true, display any changes. * @return an error code. */ public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption) { // Return an error to stop the change return super.doRecordChange(field, iChangeType, bDisplayOption); } /**
/** * Called when a change is the record status is about to happen/has happened. * @param field If this file change is due to a field, this is the field. * @param iChangeType The type of change that occurred. * @param bDisplayOption If true, display any changes. * @return an error code. */ public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption) { // Return an error to stop the change return super.doRecordChange(field, iChangeType, bDisplayOption); } /**
/** * Called when a change is the record status is about to happen/has happened. * @param field If this file change is due to a field, this is the field. * @param iChangeType The type of change that occurred. * @param bDisplayOption If true, display any changes. * @return an error code. */ public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption) { // Return an error to stop the change return super.doRecordChange(field, iChangeType, bDisplayOption); } /**
/** * Called when a change is the record status is about to happen/has happened. * @param field If this file change is due to a field, this is the field. * @param iChangeType The type of change that occurred. * @param bDisplayOption If true, display any changes. * @return an error code. */ public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption) { // Return an error to stop the change return super.doRecordChange(field, iChangeType, bDisplayOption); } /**
/** * Called when a change is the record status is about to happen/has happened. * @param field If this file change is due to a field, this is the field. * @param iChangeType The type of change that occurred. * @param bDisplayOption If true, display any changes. * @return an error code. */ public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption) { // Return an error to stop the change return super.doRecordChange(field, iChangeType, bDisplayOption); } /**
/** * Called when a change is the record status is about to happen/has happened. * @param field If this file change is due to a field, this is the field. * @param iChangeType The type of change that occurred. * @param bDisplayOption If true, display any changes. * @return an error code. */ public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption) { // Return an error to stop the change return super.doRecordChange(field, iChangeType, bDisplayOption); } /**
/** * Called when a change is the record status is about to happen/has happened. * @param field If this file change is due to a field, this is the field. * @param iChangeType The type of change that occurred. * @param bDisplayOption If true, display any changes. * @return an error code. */ public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption) { // Return an error to stop the change return super.doRecordChange(field, iChangeType, bDisplayOption); } /**
/** * Called when a change is the record status is about to happen/has happened. * @param field If this file change is due to a field, this is the field. * @param iChangeType The type of change that occurred. * @param bDisplayOption If true, display any changes. * @return an error code. */ public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption) { // Return an error to stop the change return super.doRecordChange(field, iChangeType, bDisplayOption); } /**
/** * Called when a change is the record status is about to happen/has happened. * @param field If this file change is due to a field, this is the field. * @param iChangeType The type of change that occurred. * @param bDisplayOption If true, display any changes. * @return an error code. */ public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption) { // Return an error to stop the change return super.doRecordChange(field, iChangeType, bDisplayOption); } /**
/** * Called when a change is the record status is about to happen/has happened. * If this is a select type, I synchronize the records. * @param field If this file change is due to a field, this is the field. * @param iChangeType The type of change that occurred. * @param bDisplayOption If true, display any changes. * @return an error code. */ public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption) { // Read a valid record int iErrorCode = super.doRecordChange(field, iChangeType, bDisplayOption); // Initialize the record if (iErrorCode != DBConstants.NORMAL_RETURN) return iErrorCode; if (iChangeType == m_iEventToTrigger) return this.syncRecords(); return iErrorCode; } /**
/** * Called when a change is the record status is about to happen/has happened. * If this is a select type, I synchronize the records. * @param field If this file change is due to a field, this is the field. * @param iChangeType The type of change that occurred. * @param bDisplayOption If true, display any changes. * @return an error code. */ public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption) { // Read a valid record int iErrorCode = super.doRecordChange(field, iChangeType, bDisplayOption); // Initialize the record if (iErrorCode != DBConstants.NORMAL_RETURN) return iErrorCode; if (iChangeType == m_iEventToTrigger) return this.syncRecords(); return iErrorCode; } /**
/** * Called when a change is the record status is about to happen/has happened. * If this is a select type, I synchronize the records. * @param field If this file change is due to a field, this is the field. * @param iChangeType The type of change that occurred. * @param bDisplayOption If true, display any changes. * @return an error code. */ public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption) { // Read a valid record int iErrorCode = super.doRecordChange(field, iChangeType, bDisplayOption); // Initialize the record if (iErrorCode != DBConstants.NORMAL_RETURN) return iErrorCode; if (iChangeType == m_iEventToTrigger) return this.syncRecords(); return iErrorCode; } /**
/** * Called when a change is the record status is about to happen/has happened. * @param field If this file change is due to a field, this is the field. * @param iChangeType The type of change that occurred. * @param bDisplayOption If true, display any changes. * @return an error code. * Synchronize records after an update or add. */ public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption) { // Read a valid record int iErrorCode = super.doRecordChange(field, iChangeType, bDisplayOption); // Initialize the record if (iErrorCode != DBConstants.NORMAL_RETURN) return iErrorCode; if ((iChangeType == DBConstants.AFTER_UPDATE_TYPE) || (iChangeType == DBConstants.AFTER_ADD_TYPE)) return this.syncRecords(); return iErrorCode; } /**
/** * Called when a change is the record status is about to happen/has happened. * @param field If this file change is due to a field, this is the field. * @param iChangeType The type of change that occurred. * @param bDisplayOption If true, display any changes. * @return an error code. * Synchronize records after an update or add. */ public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption) { // Read a valid record int iErrorCode = super.doRecordChange(field, iChangeType, bDisplayOption); // Initialize the record if (iErrorCode != DBConstants.NORMAL_RETURN) return iErrorCode; if ((iChangeType == DBConstants.AFTER_UPDATE_TYPE) || (iChangeType == DBConstants.AFTER_ADD_TYPE)) return this.syncRecords(); return iErrorCode; } /**
/** * Called when a change is the record status is about to happen/has happened. * @param field If this file change is due to a field, this is the field. * @param iChangeType The type of change that occurred. * @param bDisplayOption If true, display any changes. * @return an error code. * Synchronize records after an update or add. */ public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption) { // Read a valid record int iErrorCode = super.doRecordChange(field, iChangeType, bDisplayOption); // Initialize the record if (iErrorCode != DBConstants.NORMAL_RETURN) return iErrorCode; if ((iChangeType == DBConstants.AFTER_UPDATE_TYPE) || (iChangeType == DBConstants.AFTER_ADD_TYPE)) return this.syncRecords(); return iErrorCode; } /**
/** * Called when a change is the record status is about to happen/has happened. * If this file is selected (opened) move the field. * @param field If this file change is due to a field, this is the field. * @param iChangeType The type of change that occurred. * @param bDisplayOption If true, display any changes. * @return an error code. */ public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption) { // Read a valid record int iErrorCode = super.doRecordChange(field, iChangeType, bDisplayOption); // Initialize the record if (iErrorCode != DBConstants.NORMAL_RETURN) return iErrorCode; if (((iChangeType == DBConstants.SELECT_TYPE) && (m_bMoveOnSelect)) || ((iChangeType == DBConstants.AFTER_ADD_TYPE) && (m_bMoveOnAdd)) || ((iChangeType == DBConstants.AFTER_UPDATE_TYPE) && (m_bMoveOnUpdate))) this.moveTheData(bDisplayOption, DBConstants.SCREEN_MOVE); // Do trigger a record change. return iErrorCode; } /**
public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption) { int iErrorCode = super.doRecordChange(field, iChangeType, bDisplayOption); if (iErrorCode == DBConstants.NORMAL_RETURN) if (iChangeType == DBConstants.SELECT_TYPE) { BaseField fldDepartureDate = this.getOwner().getField(Tour.DEPARTURE_DATE); FieldListener listener = fldDepartureDate.getListener(ChangeTourHeaderHandler.class); listener.fieldChanged(bDisplayOption, DBConstants.SCREEN_MOVE); // Fake a departure date change } return iErrorCode; } });
public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption) { int iErrorCode = super.doRecordChange(field, iChangeType, bDisplayOption); if ((iChangeType == DBConstants.AFTER_ADD_TYPE) || (iChangeType == DBConstants.AFTER_UPDATE_TYPE)) if (!getField(AnnivMaster.kProperties).isNull()) { // This will cause the JobScheduler to reschedule the jobs (now that they have changed) BaseMessageManager messageManager = ((Application)getTask().getApplication()).getMessageManager(); Map<String,Object> properties = new Hashtable<String,Object>(); properties.put(DBParams.PROCESS, JobSchedulerReference.JOB_PROCESS_NAME); if (messageManager != null) messageManager.sendMessage(new MapMessage(new BaseMessageHeader(CalendarEntry.JOB_QUEUE_NAME, MessageConstants.INTRANET_QUEUE, this, null), properties)); } return iErrorCode; } });
public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption) { // Return an error to stop the change int iErrorCode = super.doRecordChange(field, iChangeType, bDisplayOption); if ((iChangeType == DBConstants.AFTER_ADD_TYPE) || (iChangeType == DBConstants.AFTER_UPDATE_TYPE)) if (iErrorCode == DBConstants.NORMAL_RETURN) { Record recUserInfo = this.getOwner(); Task task = recUserInfo.getTask(); String strUserName = recUserInfo.getField(UserInfo.kID).toString(); if ((strUserName == null) || (strUserName.length() == 0)) strUserName = recUserInfo.getLastModified(DBConstants.BOOKMARK_HANDLE).toString(); String strPassword = recUserInfo.getField(UserInfo.kPassword).toString(); iErrorCode = task.getApplication().login(task, strUserName, strPassword, task.getProperty(DBParams.DOMAIN)); // Always okay } return iErrorCode; } });
public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption) { int iErrorCode = super.doRecordChange(field, iChangeType, bDisplayOption); if ((iChangeType == DBConstants.AFTER_ADD_TYPE) || (iChangeType == DBConstants.AFTER_UPDATE_TYPE)) if (getSharedRecordTypeKey().getValue() == CalendarEntry.APPOINTMENT_ID) if (!getField(CalendarEntry.kProperties).isNull()) { // This will cause the JobScheduler to reschedule the jobs (now that they have changed) BaseMessageManager messageManager = ((Application)getTask().getApplication()).getMessageManager(); Map<String,Object> properties = new Hashtable<String,Object>(); properties.put(DBParams.PROCESS, JobSchedulerReference.JOB_PROCESS_NAME); if (messageManager != null) messageManager.sendMessage(new MapMessage(new BaseMessageHeader(JOB_QUEUE_NAME, MessageConstants.INTRANET_QUEUE, this, null), properties)); } return iErrorCode; } });