Is it possible to change the default order of the data in a subpanel
You can add a where statement but can you add an order by
Thanks
Is it possible to change the default order of the data in a subpanel
You can add a where statement but can you add an order by
Thanks
Hi, mikesolomon
You can modify the order by editing the file: modules/ModuleName/metadata/subpaneldefs.php
Modify the keys 'sort_order' and 'sort_by' of the subpanel you want to customize
Remember that ModuleName refers to name of the module containing the subpanel you want to customize.
It is a good idea to preserve this file subpaneldefs.php and create a new one into custom/modules/ModuleName/metadata/subpaneldefs.php containing only the modified values, like
This sample is for the file modules/Accounts/metadata/subpaneldefs.php, which should be preserved and this modifications saved into custom/modules/Accounts/metadata/subpaneldefs.phpPHP Code:<?php
$layout_defs['Accounts']['subpanel_setup']['opportunities']['sort_order'] = 'ASC';
$layout_defs['Accounts']['subpanel_setup']['opportunities']['sort_by'] = 'amount';
?>
This code modify the order by and sort order of the subpanel Opportunities under Accounts module.
Cheers
André Lopes
DevToolKit / Project of the Month - June 2009
Lampada Global Services- Open Source Solutions
Avenida Ipiranga, 318
Bloco B - CJ 1602
São Paulo, SP 01046-010
Brazil
Office: +55 11 3237-3110
Mobile: +55 11 7636-5859
e-mail: andre@lampadaglobal.com
Lampada Global delivers offshore software development and support services to customers around the world.
Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.
I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.
Andre you are a starOriginally Posted by andopes
Not sure what I'd do without you![]()
Hi i am using Sugar CE 4.5.1i and installed teams os 3.3d module but when i add users to a team and in users subpanel when i click on Next button i get this error
SQL Error : The multi-part identifier "teams.id" could not be bound.
plss help me out
thanks
regds
sid
Hi, sidh211
There is a thread discussion for Teams OS.
Fell free to post this issue there, I'm sure some one can help you.
It is a long time since my last contribution on Teams OS.
Cheers
André Lopes
DevToolKit / Project of the Month - June 2009
Lampada Global Services- Open Source Solutions
Avenida Ipiranga, 318
Bloco B - CJ 1602
São Paulo, SP 01046-010
Brazil
Office: +55 11 3237-3110
Mobile: +55 11 7636-5859
e-mail: andre@lampadaglobal.com
Lampada Global delivers offshore software development and support services to customers around the world.
Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.
I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.
andopes,
Thanks for the code snippet. Although, I can't seem to get it to work with two custom modules, ivr_Machine and ivr_System_Configuration.
I want to order the name field in my ivr_Machine subpanel, that shows up in the ivr_System_Configuration detail view. Here is the code I have:
I have the file saved in /custom/modules/ivr_System_Configuration/metadata/subpaneldefs.phpPHP Code:<?php
$layout_defs['ivr_System_Configuration']['subpanel_setup']['ivr_machine']['sort_order'] = 'ASC';
$layout_defs['ivr_System_Configuration']['subpanel_setup']['ivr_machine']['sort_by'] = 'name';
?>
I am using Sugar 5.1.
Anything you see wrong with my code or file location?
Thanks!
-chad
Hi...
I'm having the same problem... i got two custom modules as well and i want to change tha order by default field. But custom subpanelsdef.php solution isn't working for me.
I didn't even find this file (subpaneldefs.php) on the folder modules/MYCUSTOMMODULE/metadata/. But i did find in this file: custom/modules/MYCUSTOMMODULE/Ext/Layoutdefs/layoutdefs.ext.php, what i guess must be on subpaneldefs.php. If i edit it, it works, but this is an auto-generated file so the changes won't last.
Any suggestions? Thanks in advance.
Thanks for the response.
I never fold the solution for this one. What I had written above seems like it should have worked, but never did.
Anyone else run into these issues?
Thanks again.
Hi chad
The correct location is:
custom/Extension/modules/ivr_System_Configuration/Ext/Layoutdefs/layoutdefs.ext.php
André Lopes
DevToolKit / Project of the Month - June 2009
Lampada Global Services- Open Source Solutions
Avenida Ipiranga, 318
Bloco B - CJ 1602
São Paulo, SP 01046-010
Brazil
Office: +55 11 3237-3110
Mobile: +55 11 7636-5859
e-mail: andre@lampadaglobal.com
Lampada Global delivers offshore software development and support services to customers around the world.
Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.
I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.
Hi,
Using Sugar 5.2, I try to create a layoutdefs.ext.php incustom\Extension\modules\MyModuleName\Ext\Layout defs, but it does nothing. I create the file by copying the existing ModuleTests.php file.
I try to remove some files into cache directory (all into smarty/template_c) but no more success.
Any idea ?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks