I was able to retrieve the records from a DE in one of the SFMC account but is not working for other account. Is there something else to be included in below ssjs code?

<script runat="server">

var myDE = DataExtension.Init("ENT.TSDelete");
var data = myDE.Rows.Retrieve();
  for (var i = 0; i < data.length; i++) {
    var name = data[i].Name;
    var customerKey = data[i].CustomerKey;

 catch (err) {
  Write("Error Message: " + Stringify(err.message) + Stringify(err.description));
  • If on another account you were running this script on parent level, then you need to remote "ENT." prefix before Data Extension's name.
    – Niko
    Sep 29, 2021 at 7:42
  • I am running this on child account. I used DE name as well as External Key but no data shows up Sep 29, 2021 at 8:56
  • I was able to retrieve the data when the DE was present in local folder, but when using ENT. I cannot fetch the DE records for shared DE. Am I missing something here? Sep 29, 2021 at 11:22
  • I do not believe the ENT. prefix works in the CORE library, same as it does not in WSProxy and SOAP (been a bit, so might be wrong...). I believe in order to access something in a shared folder you will need to utilize WSProxy and change the environment (ClientID) to the parent level when trying to retrieve or interact with anythign in Shared. Sep 29, 2021 at 13:41

1 Answer 1


I think this part needs to change:

myDE = DataExtension.Init("ENT.TSDelete");

The initiate DE function requires the DE's External Key. In sfmc DE External Keys can't have "." characters in them. Try your code with the DE's External Key.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .