We have an issue where on some users machines using Chrome the tm1Ui.DimensionElements() is returning undefined. It works correctly in IE though. It seems to be happening on windows machines with Chrome, Macs using Chrome look like they are OK.
When looking in Chrome debugger, it looks like it is trying to make a GET call instead of a POST and returning a 400 error.
Here is the code we see it happening with.
$tm1Ui.dimensionElements($scope.page.serverName, "Period", "Last,FiscalYear", "Forecast Current By Month", "", "", "", false, false)
.then(function(periodData){
return Promise.all([periodData,
$tm1Ui.dimensionElements($scope.page.serverName, "Period", "", "", "{[Period].[" + periodData[0].Attributes.FiscalYear + "].Children}", "", "", false, false),
$tm1Ui.dimensionElements($scope.page.serverName, "Period", "","", "{LastPeriods(12,[Period].["+ periodData[0].Attributes.Last + "])}", "", "", false, false)
]);
})
.then(function(periodYearData)
{
$scope.page.Periods = periodYearData[0];
$scope.yearDetails.FirstQtrName = $scope.page.Periods[0].Parents[0].Name;
$scope.yearDetails.SecondQtrName = $scope.page.Periods[3].Parents[0].Name;
$scope.yearDetails.ThirdQtrName = $scope.page.Periods[7].Parents[0].Name;
$scope.yearDetails.FourthQtrName = $scope.page.Periods[10].Parents[0].Name;
if($scope.yearDetails.FirstQtrName.substring(1,2) == "Q1")
{
$scope.yearDetails.PriorFirstQtrVersion = "Forecast Working";
}
if($scope.yearDetails.FirstQtrName.substring(1,2) == "Q1" || $scope.yearDetails.FirstQtrName.substring(1,2) == "Q2")
{
$scope.yearDetails.PriorSecondQtrVersion = "Forecast Working";
}
if($scope.yearDetails.FirstQtrName.substring(1,2) == "Q4")
{
$scope.yearDetails.PriorThirdQtrVersion = "Forecast Working";
}
$scope.yearDetails.PriorYearName = $scope.page.Periods[0].Attributes.FiscalYear;
$scope.yearDetails.PriorMonthNames = periodYearData[2];
$scope.yearDetails.PriorYearNames[0] = periodYearData[1][0].Name;
$scope.yearDetails.PriorYearNames[1] = periodYearData[1][1].Name;
$scope.yearDetails.PriorYearNames[2] = periodYearData[1][2].Name;
$scope.yearDetails.PriorYearNames[3] = periodYearData[1][3].Name;
$scope.yearDetails.PriorYearNames[4] = $scope.yearDetails.PriorYearName;
$scope.yearDetails.PriorFirstQtrName = periodYearData[1][0].Name;
$scope.yearDetails.PriorSecondQtrName = periodYearData[1][1].Name;
$scope.yearDetails.PriorThirdQtrName = periodYearData[1][2].Name;
$scope.yearDetails.PriorFourthQtrName = periodYearData[1][3].Name;
})
.catch(function(err){
console.log(err);
});