If you want to use SuiteCRM in a way that is slight different from out of the box functionality, it is sometimes difficult to find the guidance online and requires code digging in order to find the solution. By default, when you are converting a Lead, you must create a Contact and Account. If your business process does not need either one, you need to make the following change to the code.
- Go to your SuiteCRM_ROOT/modules/Leads/metadata
- Open convertdefs.php in your text editor.
- If you want to make Contact as optional, go to approximately Line 40 where you will see a code for “$viewdefs[‘Contacts’][‘ConvertLead’]”. On Line 42, change “‘required’ => true,” to “‘required’ => false,” and you are done.
- If you want to make Account as optional, go to approximately Line 104 where you will see a code for “$viewdefs[‘Accounts’][‘ConvertLead’]”. On Line 106, change “‘required’ => true,” to “‘required’ => false,” and you are done.
Please note that this method is not upgrade safe. As soon as you upgrade it, it will wipe our your changes.
Vishal Monpara is a full stack Solution Developer/Architect with 13 years of experience primarily using Microsoft stack. He is currently working in Retail industry and moving 1’s and 0’s from geographically dispersed hard disks to geographically dispersed user leveraging geographically dispersed team members.