Add a new field to Campaigns

Hi all,

I am trying to add a field to the Campaign module and integrate same into the list, detail and edit views.
I’ve done this kind of customization to other modules (Cases, Accounts, Opportunities) successfully but Campaigns seem to be different because of the Wizard.

Another consideration is that the custom field will be used to store a fragment of html for the campaign’s Landing Page.

I’ve tried to save myself some development time by repurposing the Campaign ‘Description’ field (table->field: campaigns->contents). The html fragment is saved to the database in the Editview and is displayed in the Detailview correctly in the Detailview. The problem is that the Description element in the Editview is blank on subsequent editing of the campaign record.

Any help or insights into this issue would be appreciated.

If you want to use html format you should active html-editor for the field. Suite include tinymce. Make new object ‘SugarTinyMCE’ for the field.

Thanks for your suggestion p.konetskiy. I’ll give that a try.

Reply to my own post with how I worked around this issue.

Updated: 10/21/2020

Linux/Apache 2.4.x
PHP 7.3
Suitecrm 7.11.12

The problem was that I could not edit the content of the ‘Description’ field of the Campaign.
I traced the source of the problem to the file …/modules/Campaigns/tpls/WizardCampaignHeader.tpl.
Smarty variables $CONTENT and $OBJECTIVE should be $CAMP_CONTENT and $CAMP_OBJECTIVE. (src. lines 99 & 146) . Correcting the name to $CAMP_CONTENT fixed this problem for me. Of course copy the file to ‘…custom/modules/Campaigns/tpls/WizardCampaignHeader.tpl’ to make the change upgrade safe.


1 Like