code: public void setupSFields()
      {
          Record recContact = ((ReferenceField)this.getMainRecord().getField(MessageDetail.PERSON_ID)).getReferenceRecord();
          if (recContact != null)
              if (recContact.getEditMode() == DBConstants.EDIT_CURRENT)
              if (recContact instanceof Person)   // Profile
              {
                  BaseField field = recContact.getField(recContact.getDefaultDisplayFieldSeq());
                  field.setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY);
              }
      }
docs: SetupSFields Method.