0

Could you please help with my problem I'm facing now.

I'm using Sitecore 9 update 1.

The requirement is to add a button to the Sent Email Campaign detail page named "Export To CSV". After the user clicked on this button, a CSV file will be generated with data like clicks, date, name/email address, engagement value.

I added an action item to /sitecore/client/Applications/ECM/Component/Actions/Message/Column/Message that is already appearing in the email campaign detail page. What should I do next?

Many thanks in advance.

1

For those who need the answer. Add action item to this folder "/sitecore/client/Applications/ECM/Component/Actions/General/Column/General" for "Sent email campaigns" page a another action item to this folder "/sitecore/client/Applications/ECM/Component/Actions/Message/Column/Message" for email campign detail page

Edit these files

\sitecore\shell\client\Applications\ECM\EmailCampaign.Client\Pages\Messages.js

on the function inside this.MessageList.on('change:selectedItem' if (selectedItem.get('sent') > 0): edit the parameter of enableAction('[your new item id]', true) add this code after that //update report data service to get datasource to selected message

var dateRange = { dateTo: new Date(), dateFrom: new Date($(selectedItem.get('startDate'))[0].innerHTML) };
                        ReportDataService.set(_.extend({
                            managerRootId: sessionStorage.managerRootId,
                            messageId: selectedItem.get('itemId')
                        }, dateRange))

Get data from this.MessageList.get('selectedItem') and ReportDataService.get('totals') export to csv file from javascript

\sitecore\shell\client\Applications\ECM\EmailCampaign.Client\Pages\Messages\MessageBase.js

add new action to initActions function get data from this.MessageContext and ReportDataService.get('totals') export to csv file from javascript

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.