Display more than 10 records in SQS search.

sugarcrmdevelopers —  February 21, 2013
SugarCRM by default displays 10 records as a search result after SQS. As an example, we take Opportunities module with after_ui_frame logic hook.

Step 1 : Create logic hook entry as follows

$hook_array['after_ui_frame'] = Array();<br />$hook_array['after_ui_frame'][] = Array(5, 'Change SQS result records', 'custom/modules/Opportunities/logic_hooks/changeSQSRecordCount.php','changeSQSRecordCountC','changeSQSRecordCountF');

Step 2 : Open custom/modules/Opportunities/logic_hooks/changeSQSRecordCount.php and write following code into it.

class changeSQSRecordCountC<br />{<br />&nbsp;&nbsp;&nbsp; function changeSQSRecordCountF()<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; echo "&lt;script language='javascript'&gt;YAHOO.widget.AutoComplete.prototype.maxResultsDisplayed=20;&lt;/script&gt;";<br />&nbsp;&nbsp;&nbsp; }<br />}

Before
After

Feel free to leave comments.