Edit Email Marketing should not open Campaign assistant

Hi,

Context:

SuiteCRM 7.10.X (but I believe it would be the same in 7.8LTS)
In a campaign, I have 3 target lists:

  • customers - French
  • customers - English
  • Test target list

I need two EmailMarketing with

  • French email template for customers - French and Test target list
  • English email template for customers - English and Test target list

I have found no simple way to do that from the assistant.
… Unless I missed something in the assistant.

When I click on Edit in the list of Email Marketings under the campaign (detail view), that opens the assistant which, apparently, does not give me this capability.

Clicking Edit in the list of Email Marketings under the campaign should open the email marketing edit view so that I have the capability to select which target list(s) apply to each Email Marketing.

You are probably right that something is not very well designed here for these purposes.

But I think you could work around it like this:

  • click to edit campaigns
  • the wizard opens
  • click on the top, to select a previous step in the wizard (for example “marketing”)
  • edit or create new marketing records

Does this work?

Hi,

Opening the wizard from the top button on the campaign does not allow creation of a new marketing record.

You can create a new marketing record by:

  • going to the campaign (detail view)
  • clicking create in Email Marketing supbanel (that opens the wizard with a new Marketing record).
    But then you have no way to select which target lists apply to that new record (and only that one).

I fixed that by removing the redirect to the wizard in modules/EmailMarketing/EditView.php
It works fine and allow edit of the Email Marketing with the Edit button in the Email Marketing subpanel.

I will have to do that also for the create button on that subpanel.
… and do that in the custom folder to be upgrade-safe until this wizard is improved or when you implement the solution I propose.

This solution works better, and, more important, it’s much easier to explain to users.

I agree with you: the campaigns wizard is by no means intuitive nor useful.

Could you explain in detail what you have done (precise code modifications, files involved, custom folder, all paths, etc…) to the benefit of everyone with the same problem?

Thanks!

I think the wizard will create new record if you simply type a new Marketing name in the “Marketing” stage. I didn’t check, though.

Any way, I like your approach, I dislike the wizard for existing Campaigns. It is only good for new Campaigns.

Quick Workaround: In modules/EmailMarketing/EditView.php:
replace


if (isset($_REQUEST['record']) && $_REQUEST['record'] && isset($_REQUEST['parent_id']) && $_REQUEST['parent_id']) {
    SugarApplication::redirect('index.php?action=WizardMarketing&module=Campaigns&return_module=Campaigns&return_action=WizardHome&return_id=' . $_REQUEST['parent_id'] . '&campaign_id=' . $_REQUEST['parent_id'] . '&marketing_id=' . $_REQUEST['record'] . '&func=editEmailMarketing');
    return;
} elseif (isset($_REQUEST['record']) && $_REQUEST['record']) {
    $focus->retrieve($_REQUEST['record']);
}

by


if (isset($_REQUEST['record']) && $_REQUEST['record']) {
    $focus->retrieve($_REQUEST['record']);
}

… which is basically what it did back in 2016.

If you want to be upgrade-safe, you could try (I didn’t try as it was urgent to fix that and less urgent to make it upgrade-safe).
Create custom/modules/EmailMarketing/EditView.php with:


<?php
if (isset($_REQUEST['parent_id'])) {
    unset($_REQUEST['parent_id']);
}
require_once('modules/EmailMarketing/EditView.php');

That does not fix the create button in Email Marketing subpanel, but at least, you can edit that after creation of the new Email Marketing record.
I guess retrieving parts of the subpanel definition from an old SuiteCRM or SugarCRM CE should do it when place in custom/Extensions/…

3 Likes

Any reason why we don’t open this as a bug?

I mean the fact that the current interface blocks the user from using a functionality that SuiteCRM is still capable of (and used to work fine): selecting which target list to use for which marketing email.

https://github.com/salesagility/SuiteCRM/issues/6235

1 Like