Skip to main content
I'm trying to use the Subscriber.Retrieve functionality. As far as my knowledge, it operates on the All Subscribers list. I want to iterate throughout the list and print the records with the matching Email Address provided. 

 

  var results = Subscriber.Retrieve({Property:"EmailAddress",SimpleOperator:"equals",Value:"sanskar94259@gmail.com"});

 

      Write(Stringify(results));

 

When I try to use this, I get an error: 

 

{"message":"CreateObject Function is not valid in content. This function is only allowed in non sendable content.\r\n Function: CreateObject(\"RetrieveRequest\")","description":"ExactTarget.OMM.FunctionExecutionException: CreateObject Function is not valid in content. This function is only allowed in non sendable content.\r\n Function: CreateObject(\"RetrieveRequest\")\r\n Error Code: OMM_FUNC_CONTEXT_ERR\r\n - from Jint\r\n\r\n"}

 

Although the functionality is working and printing the result as expected, yet, I'm ubable to resolve the issue why there is an error on the preview page.
0/9000