Hi, following the anwers for your consideration.
It looks like your vardefs aren’t correctly configured, so the link between the database and the PHP code isn’t working.
The vardefs was define throgh “Module Loader” with “manifest.php” file. Here the configuration into this file:
<?php
$manifest =array(
0 =>
array (
'acceptable_sugar_versions' =>
array (
0 => '',
),
),
1 =>
array (
'acceptable_sugar_flavors' =>
array (
0 => 'CE',
1 => 'PRO',
2 => 'ENT',
),
),
'author' => 'SCS',
'description' => 'Installs a custom fields to the aos_line_item_groups',
'icon' => '',
'is_uninstallable' => true,
'name' => 'Line Item Groups - Custom Fields',
'published_date' => '2016-03-14 20:45:04',
'type' => 'module',
'version' => 1,
);
$installdefs =array(
'id' => 'AOS_Line_Item_Groups_Custom_Fields_1',
'language'=> array (
array(
'from'=> '<basepath>/Files/Language/AOS_Line_Item_Groups/pt_br.lang.php',
'to_module'=> 'AOS_Quotes',
'language'=>'pt_br'
),
),
'custom_fields'=>array (
//Numero Contrato
array(
'name' => 'numctr_c',
'label' => 'LBL__NUMCTR',
'type' => 'int',
'module' => 'AOS_Line_Item_Groups',
'help' => '',
'comment' => '',
'default_value' => '',
'max_size' => 9,
'required' => false, // true or false
'reportable' => true, // true or false
'audited' => false, // true or false
'importable' => 'true', // 'true', 'false', 'required'
'duplicate_merge' => false, // true or false
'ext1' => '',
'ext2' => '',
'ext3' => '',
'ext4' => '',
),
),
);
Vardefs created on …/custom/modules/AOS_Line_Item_Groups/Ext/Vardefs :
<?php
// created: 2016-04-12 15:32:40
$dictionary['AOS_Line_Item_Groups']['fields']['numctr_c']['inline_edit']=0;
$dictionary['AOS_Line_Item_Groups']['fields']['numctr_c']['duplicate_merge_dom_value']=0;
?>
Did you do a “Quick Repair and Rebuild” after creating the field?
Yes, I did a “Quick Repair and Rebuild” after creating the field.
In that repair, did you scroll down all the way, to see if it required you to run an SQL command, and clicked to do it?
I scroll down all the way, but I did not see SQL command running requeried.
Does your field show the current value in the database, and then turns NULL when you edit it, or does it never show any value at all?
This field is update via database directly (without SuiteCRM) throwgh another application, then while the record it is not edited on SuiteCRM, the data stay on database in the field. It turn NULL, just after edit the record on SuiteCRM.
An important information: this custom field does not appear on screen (layout) the SuiteCRM. Also it does not appear on Admin / Studio, because the AOS_Line_Item_Groups module is not visible there.