I am trying to access the value from a Data extension, using the below code. The code works fine if I pass the external key of the regular data extension. But when I pass the value of the shared data extension it does not return anything. Basically from the child BU it is not possible to access the shared data extension using the below code.
<script runat="server">
Platform.Load("Core","1");
var api = new Script.Util.WSProxy();
var initDE = DataExtension.Init("external_key_of_Data_extension");
var initDEData = initDE.Rows.Retrieve();
Write("ANS:"+initDEData[1].Name)
</script>
Please can anyone tell me how to read from the shared data extension from child BU? should I change anything in the code?