You need to sign in to do that
Don't have an account?
Filikin
Get ID of Mass Email list view
Hi,
I am using this code to get the id of the list views on contacts:
Database.QueryLocator ql = Database.getQueryLocator('select id from Contact');
ApexPages.StandardSetController setController = new ApexPages.StandardSetController(ql);
System.SelectOption[] listViews = setController.getListViewOptions();
for(System.SelectOption listView : listViews)
{
system.debug ('List view details: ' + listView);
}
but it doesn't give me the list views that appear when I go to the mass email contacts wizard - does anyone know how to get these?
My objective is to add a button to the campaign which will launch the wizard with the list view selected that matches the name of the campaign, just to cut a step out of the process.
thanks
I am using this code to get the id of the list views on contacts:
Database.QueryLocator ql = Database.getQueryLocator('select id from Contact');
ApexPages.StandardSetController setController = new ApexPages.StandardSetController(ql);
System.SelectOption[] listViews = setController.getListViewOptions();
for(System.SelectOption listView : listViews)
{
system.debug ('List view details: ' + listView);
}
but it doesn't give me the list views that appear when I go to the mass email contacts wizard - does anyone know how to get these?
My objective is to add a button to the campaign which will launch the wizard with the list view selected that matches the name of the campaign, just to cut a step out of the process.
thanks
But there are other list views that don't have an sObjectType and so I can't figure out how to filter out just the mass email list views.
Anyone know how?