<div dir="ltr">I meant the page layout editor. But even vtlib would be great.<div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Saludos<div><br></div><div>Rubén</div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 21, 2022 at 11:22 AM Sukhdev Mohan <<a href="mailto:s.mohan@myti.it">s.mohan@myti.it</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



<div>
<div name="messageBodySection">
<div dir="auto">Checking this out right now.<br>
<br>
Yeah it could save us the trouble of debugging each part of the the code base… By Field editor you mean the Layout page in settings? Or the Vtlib api? Is there any other tool?<br>
<br>
It’s be also nice to have an updated list of UITYPEs, some of the previous ones you may find on google or web archive are outdated or doesn’t work...</div>
</div>
<div name="messageSignatureSection"><br>
<div><font color="#C6C6C6"><b><span>Sukhdev Mohan</span></b></font><span></span><br>
<font color="#999999"><b><span>Developer</span></b></font><span></span><br>
<b><br></b><b><font color="#AAAAAA"><span>MyTi S.r.l -</span></font><span><font color="#C6C6C6"> </font></span></b><span><font color="#E69138">share the path</font></span><br>
<font color="#AAAAAA"><span>Via Branze 44, Brescia</span></font><span></span><br>
<font color="#0066CC"><a href="http://www.myti.it/" target="_blank"><b><span>www.myti.it</span></b></a><span><b></b></span><br>
<br>
<a href="https://www.myti.it/bleen-find-measure-and-use/" target="_blank"><b><span>Bleen</span></b></a><span><b> - <a href="https://www.myti.it/declaro-configuratore-di-prodotto/" target="_blank">Declaro</a> - <a href="https://www.myti.it/dundas-business-intelligence/" target="_blank">Dundas</a> - <a href="https://www.myti.it/elibra-gestionale-studi-legali/" target="_blank">Elibra</a></b></span></font><br></div>
</div>
<div name="messageReplySection">On 21 Feb 2022, 18:14 +0100, Rubén A. Estrada Orozco <<a href="mailto:rulotec1@gmail.com" target="_blank">rulotec1@gmail.com</a>>, wrote:<br>
<blockquote type="cite" style="border-left:thin solid grey;margin:5px;padding-left:10px">
<div dir="ltr">
<div>Hi Sukhdev,</div>
<div><br></div>
<div>I worked on this just a few days ago. To add a line item field you have to edit the following files:</div>
<div><br></div>
  - include/utils/EditViewUtils.php # in order to read your field from the DB and show it in DetailView<br>
  - include/utils/InventoryUtils.php # in order to save your field into the DB when saving a record<br>
  - layouts/v7/modules/Inventory/LineItemsDetail.tpl # to display your field in the DetailView<br>
  - layouts/v7/modules/Inventory/partials/LineItemsContent.tpl # to display your field in EditView<br>
  - layouts/v7/modules/Inventory/partials/LineItemsEdit.tpl # to display the table header of your field in EditView
<div><br></div>
<div>I should say... it's a pretty common request from clients to add fields to the line items section. It would be great to do it via the Fields Editor.</div>
<div><br clear="all">
<div>
<div dir="ltr">
<div dir="ltr">Saludos
<div><br></div>
<div>Rubén</div>
</div>
</div>
</div>
<br></div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Feb 21, 2022 at 11:01 AM Sukhdev Mohan <<a href="mailto:s.mohan@myti.it" target="_blank">s.mohan@myti.it</a>> wrote:<br></div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div name="messageBodySection">
<div dir="auto">Hi all,<br>
<br>
I want to save a hidden input value into vtiger_inventoryproductrel along with the other line item properties. I’ve already crated the field and a the column and followed the naming convention (myvar$row_no) but when I save the value isn’t saved. I’m not understanding where I’m missing. <br>
<br>
It seems that some thing happens in getRecordModelFromRequest() in modules/Vtiger/actions/Save.php<br>
This code seems to transfer the the values from the form to the RecordModel but there is no logic for columnName$row_no and all the others properties are being settled correctly. What am I missing?</div>
<pre>$fieldModelList = $moduleModel->getFields();
      foreach ($fieldModelList as $fieldName => $fieldModel) {
   $fieldValue = $request->get($fieldName, null);
   $fieldDataType = $fieldModel->getFieldDataType();
   if($fieldDataType == 'time'){
      $fieldValue = Vtiger_Time_UIType::getTimeValueWithSeconds($fieldValue);
   }
   if($fieldValue !== null) {
      if(!is_array($fieldValue) && $fieldDataType != 'currency') {
         $fieldValue = trim($fieldValue);
      }
      $recordModel->set($fieldName, $fieldValue);
   }
}</pre>
<div dir="auto"><br></div>
</div>
<div name="messageSignatureSection"><br>
<div><font color="#C6C6C6"><b><span>Sukhdev Mohan</span></b></font><span></span><br>
<font color="#999999"><b><span>Developer</span></b></font><br></div>
</div>
</div>
_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a></blockquote>
</div>
_______________________________________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br></blockquote>
</div>
</div>

_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a></blockquote></div>