```var loaded = nlapiLoadFile(1118); var load = n...
# suitescript
c
Copy code
var loaded = nlapiLoadFile(1118);
	var load = nlapiLoadFile(1122);
	var old = load.getValue();
	var newfile = loaded.getValue;
	var combine = (old + newfile);
	nlapiLogExecution('DEBUG', 'loade:',loaded.getValue());
	var newAttachment = nlapiCreateFile(name + ".xls", 'EXCEL',combine);
	newAttachment.setFolder(317);
	var file = nlapiSubmitFile(newAttachment);
	var test = nlapiLoadFile(file);
	nlapiLogExecution('DEBUG', 'file:', test.getValue());
I am trying to combine two files together to create one file. I am getting this error "An unexpected SuiteScript error has occurred" Am I doing something wrong?