code: public MessageTransport getDefaultMessageTransport(MessageDetailTarget recMessageDetailTarget, MessageProcessInfo recMessageProcessInfo)
      {
          try {
              ContactType recContactType = (ContactType)((ReferenceField)this.getField(MessageDetail.CONTACT_TYPE_ID)).getReferenceRecord(null);
              recContactType = (ContactType)recContactType.getContactType((Record)recMessageDetailTarget);
              if (recContactType == null)
                  return null;    // Just being careful
          
              this.setKeyArea(MessageDetail.CONTACT_TYPE_ID_KEY);
              this.getField(MessageDetail.CONTACT_TYPE_ID).moveFieldToThis((BaseField)recContactType.getCounterField());
              this.getField(MessageDetail.PERSON_ID).moveFieldToThis((BaseField)((Record)recMessageDetailTarget).getCounterField());
              this.getField(MessageDetail.MESSAGE_PROCESS_INFO_ID).moveFieldToThis((BaseField)recMessageProcessInfo.getCounterField());
              this.getField(MessageDetail.MESSAGE_TRANSPORT_ID).setValue(0);
              if (this.seek(">="))
              {
                  if (this.getField(MessageDetail.CONTACT_TYPE_ID).equals((BaseField)recContactType.getCounterField()))
                      if (this.getField(MessageDetail.PERSON_ID).equals((BaseField)((Record)recMessageDetailTarget).getCounterField()))
                          if (this.getField(MessageDetail.MESSAGE_PROCESS_INFO_ID).equals((BaseField)recMessageProcessInfo.getCounterField()))
                              if (!this.getField(MessageDetail.DEFAULT_MESSAGE_TRANSPORT_ID).isNull())
                                  return (MessageTransport)((ReferenceField)this.getField(MessageDetail.DEFAULT_MESSAGE_TRANSPORT_ID)).getReference();
              }
          } catch (DBException ex)    {
              ex.printStackTrace();
          }
          return null;
      }
docs: Get the default message transport for this target/process.