Export in Sandbox Env

Hi,
Having some issues with the scripting function of downloading the dashboard into an Excel export.
This is the script I’m using:
// Get the export service.
var exportService = this.getService(‘ExportService’);

// Get the view service.
var viewService = this.getService(‘ViewService’);

// Get the web app service.
var webAppService = this.getService(‘WebAppService’);

// Create the export request.
var exportRequest =
new dundas.export.ExportRequest(
{
isLegacyExport: false,
// Export Excel
providerId: dundas.constants.STANDARD_EXCEL_EXPORT_PROVIDER_ID,
viewId: this.parentView.id,
viewData: this.getService(“CanvasService”).canvas.viewModel.businessObject.control
});

// Get the perform export promise.
var exportPromise =
exportService.performExport(exportRequest);

// Setup a loading dialog.
viewService.showLoadingRestCall(exportPromise);

exportPromise.done(
function(exportId)
{
// Get the Url for the export file.
var exportFileUrl =
webAppService.getExportResultUrl(exportId);

  	// Force the browser to download the file.  
  	window.location.replace(exportFileUrl);
}

);

It worked before a sandbox update, but now is currently not working. Would definitely appreciate some help! Thank you!

Instead of

webAppService.getExportResultUrl(exportId);

Use:

exportService.getExportResultUrl(exportId);

Worked, thank you!!!