1

I have some simple code in a managed package to populate a selectoption list e.g.

List<SelectOption> camps = new List<SelectOption> ();
for (Campaign c: [Select Id, Name FROM Campaign WHERE IsActive = TRUE] ) {
    camps.add(new SelectOption (c.Id, c.Name));
}

That works fine with one drawback - letting installed customers add additional filters is tricky - I've built tools to let them do that in the past, but they get messy...

But I realized I am able to achieve the same via the Analytics API and a Sync Report. I can store the Report Id in a C/S and then let customers add more filters to the report using the standard report builder. I did a quick test and the performance seemed better via the Analytics API, which surprised me a bit.

My question is whether anyone else has used this approach, in particular in a managed package. If so, beyond the users changing the report, which I can see being an issue, are there any other risks involved with this vs SOQL?

Your Answer

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

Browse other questions tagged or ask your own question.