Email Template With Attachment – SugarCRM / SuiteCRM

SugarCRM, SuiteCRM Navin Rakhonde
If user want email with attachment this can be done very easily in SugarCRM / SuiteCRM. Steps are as below, Step 1 : Get the Email Template detail using following code, require_once(‘modules/EmailTemplates/EmailTemplate.php’); $emailTemp = new EmailTemplate(); $emailTemp->disable_row_level_security = true; $emailTemp->retrieve($emailTemplateId); print_r($emailTemp); Step 2 : Get the Attachments of Email Template…
Read More

Add Record To Relationship table – SugarCRM / SuiteCRM

SugarCRM, SuiteCRM Navin Rakhonde
Here there is one to many relation ship between Target(Prospect) to LeadAnd the relation is ‘prospects_leads_1’So we can add relationship table entry using following code. $object = BeanFactory::getBean(‘<module_name>’, $bean->id); $object->load_relationship(‘<relationship_module_name>’); $object->prospects_leads_1->add($bean-><module_id>); Note :1. Here, <module_name> means the module name you see in the URL, for example, Contacts, Leads, Accounts, etc.2.…
Read More

Removing buttons From SugarCRM / SuiteCRM Detail View

SugarCRM, SuiteCRM Navin Rakhonde
Following Code will Remove the Fourth button from the Detailview of ModuleThis code should be placed in the display() function in the view.detail.php of the module in which we want to remove the button unset($this->dv->defs[‘templateMeta’][‘form’][‘buttons’][3]); $this->dv->process(); echo $this->dv->display(); Hope you find this blog post helpful. Feel free to add comments…
Read More

Getting all ids of All Listview Records – SugarCRM / SuiteCRM

SugarCRM, SuiteCRM Navin Rakhonde
Below code is used to get all id of listview Of Module.This function should be used in the view.list.php of custom/modules/<module_name>/views/ function display() { global $db; parent::display(); $ids=$this->lv->data[‘pageData’][‘idIndex’]; print_r($ids); } Note :1. Here, <module_name> means the module name you see in the URL, for example, Contacts, Leads, Accounts, etc. Hope…
Read More