I'm building a function that will retrieve data by certain criteria. However, not a single retrieve function will work with a shared data extension. Lookup Rows works, but not retrieve. Data extensions that are not shared work, but as soon as I change my D/E to the shared, I get an empty JSON.
Here is my code:
<script language="JavaScript" runat="Server" excutioncontexttype="get">
Platform.Load("Core","1.1");
//Define my Data Extension this is the external key
var myDE = DataExtension.Init('ent.myDE');
//Simple lookup. This should return a couple of rows
var filter = {Property:'Activity_Id',SimpleOperator:'equals',Value:'SomeDudesId'};
var data = myDE.Rows.Retrieve(filter);
//At this point I want the data to return as a JSON obj.
function retrieveData(){var jsonData = Stringify(data); return jsonData}
retrieveData();
//Printing this on the page because the microsite is in JSON format
Write(Stringify(data));
</script>
I am getting empty array everytime with this code.