UPDATE - You can only use SJSS in automation studio and web pages, not within emails. For this you need AMPscript.
Original question:
I can not use any SJSS functions in emails on Marketing cloud (ExactTarget).
My email contains the following:
<script type="javascript" runat="server">
Platform.Load("Core","1");
var de = DataExtension.Init("<data extension external key>");
var de2 = de.Rows.Retrieve();
</script>
and I receive the error:
Unable to generate preview
An error occurred when attempting to execute a Javascript block. See inner
exception for detail.
Script:
Platform.Load("Core","1");
var de = DataExtension.Init("<data extension external key>");
var de2 = de.Rows.Retrieve();
ListID: 0
Index: 4
Object expected: Retrieve
Line: 4 Char: 0
var de2 = de.Rows.Retrieve()
Exception of type 'Jint.Native.JsException' was thrown.
I can not find any documentation on this error. Has anyone encountered this before?