AnsweredAssumed Answered

Massupdate for custom field issue.

Question asked by pavan agrawal on Mar 11, 2016
Latest reply on Mar 18, 2016 by pavan agrawal

Hi,

 

We need to update field type int as a massupdate. i have followed these instruction https://support.sugarcrm.com/Knowledge_Base/Administration/Studio_and_Module_Builder/Adding_a_Field_to_Mass_Update/index…

Field is display in mass update box but not able to update.

Once i check code found <input type="text" name="Array" size="12" id="Array" maxlength="10" value="">

name as array. i search same function in MassUpdate.php and found its written as

case "int":

  if(!empty($field['massupdate']) && empty($field['auto_increment']))

  {

  $even = !$even; $newhtml .=$this->addInputType($displayname, $field);

  }

 

If we change $field to $field['name'] then it works. Please tell me, Is this issue or i am doing wrong?

 

function addInputType($displayname, $varname){

  //letrium ltd

  $displayname = addslashes($displayname);

  $html = <<<EOQ

  <td scope="row" width="20%">$displayname</td>

  <td class='dataField' width="30%"><input type="text" name='$varname' size="12" id='{$varname}' maxlength='10' value=""></td>

  <script> addToValidate('MassUpdate','$varname','int',false,'$displayname');</script>

EOQ;

  return $html;

  }

Outcomes