function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Murilo GarcezMurilo Garcez 

I want to retrieve records from a List and update a DE, what's wrong with my code?

I tried retrieve the records from my list and then try "updateitem" with Data Extension inside
but it's not working

 

<script runat="server">
 
    Platform.Load("core", "1");
 
    var api = new Script.Util.WSProxy();
 
 try {
 
 var res = api.retrieve("ListSubscriber", 
    ["SubscriberKey"],
    {
        Property: "ListID",
        SimpleOperator: "equals",
        Value: "xxxx"
    }
);
   
   var options = {
 SaveOptions: [
  {
   PropertyName: 'SubscriberKey',
   SaveAction: 'UpdateAdd'
  }
 ]
};
   var result = api.updateItem('Subscriber', {
 CustomerKey: "XXXXXXX-XXXXX-XXXXX-XXXXX"
 
}, options);
 Write(Stringify(res));
  
 } catch(error) {
  Write(Stringify(error));
 }
 
</script>
My web page returns the subscribers but do not update my Data Extension, any help about my code is useful, thanks in advance!
PriyaPriya (Salesforce Developers) 
Hi,

What error it is throwing ?

Did you check the debug log?

Thanks!
Murilo GarcezMurilo Garcez
Hi, not yet, where can I see the Debug Log? The problem is, my web page isn't giving me a error, but it's not updating my DataExtension as I would like that happens, the web page just retrieve the records but do not update, and I'm looking for, why this happen
Maggie JosephMaggie Joseph
Please check your debug log. I sure will be solved. Here are the best trustworthy Java Development Companies (#) for your all solutions.
Maggie JosephMaggie Joseph
Please check your debug log. I sure will be solved. Here are the best trustworthy Java Development Companies (https://www.10techdesign.com/top-10-java-development-companies/" target="_blank) for your all solutions.