1

I am trying to access Shared Data Extension using Server Side Javascript. I am trying the below stated code but it is not working. Even though the Data Extension has more than 1 record, the length I am getting is when I try to look up records on DE is coming as 0.

var journeyConfigurationDE = DataExtension.Init("ENT.Journey_Configuration_DE_NL");

Any help is appreciated.

1 Answer 1

1

Please share your code for using the JavaScript core library to access a shared data extension.

I can confirm that the following works which uses SSJS Platform functions:

<script runat="server">
     var dataRows = Platform.Function.LookupRows('ENT.My Favorite Shared DE','Key','1');
     Platform.Response.Write(dataRows.length);
     if(dataRows && dataRows.length > 0) {
          for(var i=0; i<dataRows.length; i++) {
               Platform.Response.Write(dataRows[i]["Key"]);
          }
     }
</script>

Reference: Interacting with Data Extensions Using the Function Object

0

You must log in to answer this question.

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