Checkbox Export to CSV Blank

Hello,

I am trying to export contacts with email addresses and the checkbox if someone has unsubscribed. When I review the CSV file, the Opt Out column is blank, even for those where I know they have opted out. We are using SuiteCRM 7.10.7.

Does anyone know how to resolve this?

Thanks

John

I think I know what’s happening. This is a bit tricky :unsure:

Exporting from Contacts will only give you the Contact’s fields. There’s a field called “do not call”.

But emails are stored in a related table called email_addresses (each contact can have more than one email address). This has a field called “opt_out” which is what you want (it’s not the same as the other “do not call”).

The reason you can export an email address is because there is a field in contacts called email1 which is basically a cached copy of the first email address, for convenience. But it doesn’t let you handle the full functionality of Contact email addresses.

So I suggest you use a Report (reports module) instead of an export. This way you can access the email addresses module directly. Then you can export to CSV.

Hi and thanks for your prompt reply.

I am using the report module and are exporting the email address and Opt Out field from the associated email table as you suggest. This gives me the blank Opt Out column in the csv export.

Any other ideas will be much appreciated.

Thanks again,

John

You can check create_export_query function in modules/Accounts/Account.php for some insights and add your conditions/query to add the Opt Out column values.