<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body smarttemplateinserted="true" text="#000000" bgcolor="#FFFFFF">
    Dear vtiger Team, and vtiger Community,<br>
    <br>
    I have just found the solution:<br>
    There are 2 files responsible for the below mentioned issue:<br>
    <br>
    .../modules/Vtiger/actions/Save.php<br>
    .../modules/Vtiger/actions/SaveAjax.php<br>
    <br>
    and both of them contain a method:  <b>getRecordModelFromRequest(Vtiger_Request
      $request) </b>and these methods (with too same names) are
    responsible for the getting record data and prepare data before save
    to the database.<br>
    Rewriting and extending the classes to the CustomModule and
    inserting a small snippet to the proper place<br>
                if($fieldDataType == 'multipicklist'){<br>
                    $fieldValue =
    $fieldModel->getDBInsertValue($fieldValue);<br>
                }<br>
    the issue was handled.<br>
    <br>
    So, I kindly ask you to review it and modify if it is necessary the
    core files to make able to handle fields by relating uitype records.<br>
    <br>
    Regards:<br>
    Istvan<br>
    <br>
    -------------------------------------------------------------------<br>
    Dear vtiger Team, and vtiger Community,<br>
    <br>
    I am involved a vtiger 6.1 custom module development and now I've
    got stuck in this case:<br>
    <br>
    I created a custom multipicklist field for this custom module. This
    multipicklist field is stored in the SQL db in the form of "1 |##| 2
    |##| 3" (similar to the vtiger standard multipicklist) where 1, 2
    and 3 the selected data indexes.<br>
    The $field_model->getDisplayValue($value) method - whit proper
    overwrites - works everywhere (listview, detailview, editview) and
    shows the field data as "Label1, Label2, Label3".<br>
    <br>
    When editing (or creating a new) record of the custom module the
    consequence $field_model->getDBInsertValue($value) method is not
    called.<br>
    <br>
    The custom multiselect field UI works well, because <br>
    - the label list is displayed well.<br>
    - if I choose only 1 item, e.g. Label2, the save method will save to
    the database 2 (2 = index of Label2).<br>
    <br>
    - if I choose multiple selectable items, e.g. Label2 and Label3 the
    input content of the field will be consequently "2,3"<br>
    - if I choose multiple selectable items, e.g. Label2 and Label4 and
    Label5 the input content of the field will be consequently "2,4,5" -
    in this coma separated form.<br>
    <br>
    I put debug tags to all related files and methods and I see in the
    debugger that the filed UI works, the multiselect works, but the
    $field_model->getDBInsertValue($value) method - where the "2,4,5"
    should be changed into "2 |##| 4 |##| 5" - <b>is not called</b>.<br>
    <br>
    My question is how to fire this method depending the
    $field_model->uitype_model ?<br>
    <b><u><br>
      </u></b><b><u>The coma separated input of the field cause an other
        error also.</u></b><br>
    <br>
    And this is a vtiger 6.1 serious BUG.<br>
    This custom module record has 11 fields. And the update record
    method fired from the vtiger_module parent uses 10 fields to updete
    + the record_id = 11 input data together for the db-update method.<br>
    <br>
    When a sole select in this filed - all work well.<br>
    <br>
    When a multiple select in this custom field, the selected values
    e.g. "2,4,5" operate as independent integer values to insert or
    update sql. It means when the update method required 11 data unit,
    it will receive 13 because the "2,4,5" will be interpreted as 3
    separate values.<br>
    I think the missing db-quotes (in the basic methods) are responsible
    for this issue.<br>
    <br>
    So, the other question is - how to handle it?<br>
    <br>
    Kindest regards:<br>
    Istvan<br>
    <br>
    <div class="moz-signature">-- <br>
      üdvözlettel:<br>
      <br>
      <b>Holbok István</b><br>
      <br>
      +3670-342-0900<br>
      <b>e-mail:</b> <a class="moz-txt-link-abbreviated"
        href="mailto:holbok@gmail.com">holbok@gmail.com</a><br>
      <b>SkyPe:</b> holboki<br>
      <br>
    </div>
  </body>
</html>