Posted on

SuiteCRM Converting Lead with custom fields into the new Account

Scenario

In “Account” you have the field named “industry” but this field doesn’exist in entity “Lead”. You need to have thi field also in the “lead” and this field must be converted in the corresponding field in the new Account entity.

Create Custom Field

In “Studio” search for Account entity and select “fields” folder. Search for the “industry” field. As you can see, this field is a dropdown field linked to “industry_dom” field.

Move yourself to “Lead” entity in fields folder : create a new field named, for example, mec_lead_industry_c. You need to link this field to the “industry_dom” field, so you will have in Account and Lead the same data in the drop down.

Now you have to do a customization of Lead’s forms to see the new field. So you will be able to set this information for your Lead. The problem is that, when you will convert this lead in a new acount , you will not see the related informaztion about “industry” (in account entity).

Map Custom field between Lead and Account

Create a Copy of /modules/Leads/views/view.convertlead.php in custom/modules/Leads/views/
Edit your copy

Search for this code :

if ($module == 'Contacts') {
$beans[$module]->id = create_guid();
$beans[$module]->new_with_id = true;
$beans[$module]->account_id = '';
}

After this code you have to add, in our example, this code to automatically map the two fields in transformation.

if ($module == 'Accounts')
{
$beans[$module]->industry = $lead->mec_lead_industry_c;
}

SOME USEFULL FIELDS

Entity Description Name dropodwon field
Account Type account_type account_type_dom
Account Industry industry industry_dom
Lead lead_source lead_source lead_source_dom
Contact lead_source lead_source lead_source_dom
Posted on

SuiteCRM impostazione colori

Dentro a SuiteCRM esiste un layout di default. Questo layout può avere 4 combinazioni di colori diverse. Queste combinazioni possono essere scelte da ciascun utente.

Per farlo entrate nell’applicazione ed in alto a destra selezionate la voce di menu “profilo”.

Posizionatevi nella tab “Opzioni Layout” e selezionate uno dei 4 tipi.

Non dimenticate di spingere in basso il pulsante “SALVA”.

Posted on

SuiteCRM Print as PDF produces corrupted PDFs

Whenever you use the Print as PDF option, the output is unopenable (Acrobat says it’s been damaged). You can edit the generated pdf file with Notepad ++. You can see that before the start of the pdf text (% PDF-1.4), there is a list of php warnings. If you delete all these lines and save the file, you will be able to view your pdf.

Solution

This solution is valid for SuiteCRM versions 7.11.18 and 7.11.21.
These versions are not compatible with php higher than version 7.3. So upgrade your php to version 7.3 and everything will work.