Show message after redirection

SugarCRM, SuiteCRM Navin Rakhonde
Let's alert user a message after redirection to any view. Following piece of code will show a message at the top of the view you have redirected user to. SugarApplication::appendErrorMessage('You have been redirected here because ....'); If you dont know how to redirect user to a certain view, SugarApplication::redirect('index.php?module=<MODULE_NAME>&action=<ACTION>&record=<RECORD_ID>'); After…
Read More

Dealing with multienums with SugarCRM

SugarCRM, SuiteCRM Navin Rakhonde
SugarCRM comes with a very handful function to convert multi enum values from ^value_1^,^value_2^,^value_3^,^value_4^ into an array. $aField = unencodeMultienum($fieldValue); var_dump($aField); will give you an array. In the same manner the reverse is possible. Give an array of values which will be converted into a string which SugarCRM understands. encodeMultienumValue($arr);…
Read More

Display more than 10 records in SQS search.

SugarCRM, SuiteCRM Navin Rakhonde
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. Steps are as below, Step 1 : Create logic hook entry as follows $hook_array['after_ui_frame'] = Array(); $hook_array['after_ui_frame'][] = Array(5, 'Change SQS result records', 'custom/modules/Opportunities/logic_hooks/changeSQSRecordCount.php', 'changeSQSRecordCountC','changeSQSRecordCountF'); Step 2 : Open…
Read More