I am trying to check if collaborative forecasts is enable in a Organization, for that i am using the following code:
LOG.log(Level.INFO, "Check if the collaborative forecasting is enabled");
setUpConnection(FORCE_METADATA_API);
ReadResult readResult = metadataConnection.readMetadata("ForecastingSettings", new String[]{"Forecasting.settings"});
if (readResult.getRecords().length > 0) {
ForecastingSettings forecastSettings = (ForecastingSettings) readResult.getRecords()[0];
enableForecasts = forecastSettings.isEnableForecasts();
}
But i am receiving the following exception message:
INVALID_TYPE: This type of metadata is not available for this organization