2

The topic has been discussed a while ago in this thread, however with no particular outcome. I came up with the similar problem and thought that someone perhaps would know more since that time.

We have developed tool/dashboard in SalesForce that shows performance of sales people compared to their targets. That's build using VF/APEX. One of the features is when you click on one of the dashboard components it will bring you to the standard SalesForce report that shows more details.

Now the problem is: our org is using multi-currency and the reports are created in Euros. At the same time tool will be used globally and sales people would like to see the the report using their own currency.

Of course they can go edit the report, manually change the currency using Show -> Currencies using, however that is an extra step and there is a chance someone will overwrite something if they will save the report instead of just closing it.

Is there a way to invoke some programmatic method to already change the report currency based on the users' language. Using APEX , JS or any other method ? This is really needed, because making a copy of report using every currency is not feasible - there will be TOO many to manage.

Any ideas?

0

I don't know if it is really actual but I just used this trick

    //here is just getting the report metadata
    Reports.ReportResults descr = Reports.ReportManager.runReport(reportId, false);
    Reports.ReportMetadata rm = descr.getReportMetadata();

    //and here set the current user's currency
    rm.setCurrencyCode(UserInfo.getDefaultCurrency());

    //and then...
    Reports.ReportResults results = Reports.ReportManager.runReport(reportId, rm, true);

please refer this link

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.