Menu

SuiteCRM Master Classes 2018

Welcome, Guest
Username: Password: Remember me

TOPIC: Unable to move filed from Hidden to Default/Available in list View

Unable to move filed from Hidden to Default/Available in list View 3 weeks 4 days ago #64682

  • markkhan
  • markkhan's Avatar
  • Offline
  • New Member
  • Posts: 10
  • Karma: 0
Hi All,

I have custome module created name Purchase Order, In there module there is custome field created for auto increment as Invoice Number.

The field is woking perfectly fine but when it comes to list view, I go to Studio>MyCustomModule>Layouts>ListView.

When i move MyCustomField from hidden to Defualt/Avaiable as soon as I press save & Deploy the page refreshes and it moves MyCustomField back to Hidden.

I've tried to do this through couple of other broweres and also I've run Repair and Rebuilt several times but no luck!

Can anybody please help.

Thank you in advance.
The administrator has disabled public write access.

Unable to move filed from Hidden to Default/Available in list View 3 weeks 3 days ago #64693

  • suitecrm_developer
  • suitecrm_developer's Avatar
  • Offline
  • Elite Member
  • Posts: 200
  • Thank you received: 16
  • Karma: 3
Hi,
Can you please open the "List View" file and modify it to show that auto increment field there from back-end.
May be there is some studio issue.
Can you please also mention how have you created that auto increment field??

thanks
Sohaib Majeed
SuiteCRM Developer
Upwork ==>> www.upwork.com/fl/sohaibmajeed?viewMode=1
Skype ==>> sohaib.majeed44
The administrator has disabled public write access.

Unable to move filed from Hidden to Default/Available in list View 5 days 9 hours ago #66028

  • markkhan
  • markkhan's Avatar
  • Offline
  • New Member
  • Posts: 10
  • Karma: 0
Hi There,

Thanks for your reply.

To do this, don't add the field via Studio, add a new file in custom/Extension/modules/yourmodule/Ext/Vardefs e.g. autoincrement.php with the following :
<?php
$dictionary['YOUR_MODULE']['fields']['NAME_OF_AUTO_INC_FIELD'] = array(
'name' => 'NAME_OF_AUTO_INC_FIELD',
'vname' => 'LBL_LABEL_OF_AUTO_INC_FIELD',
'type' => 'int',
'readonly' => true,
'len' => 11,
'auto_increment' => true,
'disable_num_format' => true,
);
?>

and also add unique index for the field in that file
<?php
$dictionary['YOUR_MODULE']['indices']['NAME_FOR_INDEX'] = array(
'name' => 'NAME_FOR_INDEX',
'type' => 'unique',
'fields' => array('NAME_OF_AUTO_INC_FIELD'),
);
?>

Run a Quick Rebuild and Repair in Admin -> Repair and execute the changes.

Thanks,
Last Edit: 5 days 7 hours ago by pgr. Reason: add code tags
The administrator has disabled public write access.

Unable to move filed from Hidden to Default/Available in list View 5 days 2 hours ago #66058

  • suitecrm_developer
  • suitecrm_developer's Avatar
  • Offline
  • Elite Member
  • Posts: 200
  • Thank you received: 16
  • Karma: 3
Can you please add this field into list view from

"custom/modules/YOUR-MODULE/metadata/listviewdefs.php"
'NAME_OF_AUTO_INC_FIELD' => 
  array (
    'width' => '10%',
    'label' => 'LBL_LABEL_OF_AUTO_INC_FIELD',
    'default' => false,
  )

Thanks
Sohaib Majeed
SuiteCRM Developer
Upwork ==>> www.upwork.com/fl/sohaibmajeed?viewMode=1
Skype ==>> sohaib.majeed44
The administrator has disabled public write access.
Time to create page: 0.046 seconds
Powered by Kunena Forum