since ‎23-12-2020
‎16-04-2021
JamesAlio
Level 1
Re: How to use Promise in javaScript activity
Avatar

JamesAlio

JamesAlio
- Adobe Campaign Classic
Hello @Sukrity_Wadhwa no i still have the same problem. the Promise object is undefined in my Js Activity

Views

60

Likes

0

Replies

0
HttpClientRequest not working properly when using Keep Alive
Avatar

JamesAlio

JamesAlio
- Adobe Campaign Classic
Hello,i used the example in the doc (Keep Alive example) https://docs.adobe.com/content/help/en/campaign-classic/technicalresources/api/c-HttpClientRequest.htmlto implement it in my real case.i have an array with 50 json object that i want to insert in a DB using an external API , this is my code : var apiRequest = new HttpClientRequest("www.myAPI.com"); apiRequest.method = "POST"; // open the connection with my api apiRequest.connect(); // loop through my array to insert each element. 50 calls ...

Views

75

Likes

0

Replies

0
How to use Promise in javaScript activity
Avatar

JamesAlio

JamesAlio
- Adobe Campaign Classic
Hello,i want to use the following code in a javascript activity but im getting an error : var myPromise = new Promise(function(myResolve, myReject) { setTimeout(function() { myResolve("I love You !!"); }, 3000); }); myPromise.then(function(value) { logInfo('Helllo Promise : '+value); }); this is the error that i get : 02/04/2021 16:02:11 js7 JST-310000 ligne 2 : Promise is not defined. do you have any solution please ?Thanks in advance.

Views

141

Likes

0

Replies

5
Re: sqlGetInt queryDef Equivalent
Avatar

JamesAlio

JamesAlio
- Adobe Campaign Classic
Thank you so much

Views

77

Likes

0

Replies

0
sqlGetInt queryDef Equivalent
Avatar

JamesAlio

JamesAlio
- Adobe Campaign Classic
Hello,im using this native query and it works fine but i want to know how i can do the Something using queryDef.this is my native SQL: var email = NLWS.xtkSession.FormatDataPolicy("lowerCase", email.trim()); var firstName = NLWS.xtkSession.FormatDataPolicy("lowerCase", firstName); var lastName = NLWS.xtkSession.FormatDataPolicy("lowerCase", lastName); var sql ="SELECT R0.iRecipientId FROM NmsRecipient R0 JOIN XtkFolder F1 ON (F1.iFolderId = R0.iFolderId) WHERE LOWER(R0.sFirstName)='"+firstName+"...

Views

110

Likes

0

Replies

2
How to call HttpClientRequest in batch mode
Avatar

JamesAlio

JamesAlio
- Adobe Campaign Classic
Hello, I'm working on a workflow where I have to call an external API using HttpClientRequest and all work fine.The API that I call uses pagination so I have to call the API to get results for each page. I have 10 pages so I have to make 10 calls. I'm wondering if there is a way to make only one call to get the result instead of 10 calls.this is my current code : var requestUrl = "https://www.muapiurl.com?";// 10 callsfor (var i = 1; i <= 10; i++) {var requestParam = "page="+i;var url = requestU...

Views

192

Likes

0

Replies

1
Re: How to create an adobe campaign List using a json arr...
Avatar

JamesAlio

JamesAlio
- Adobe Campaign Classic
okay , can you please show me how i can create the table or just give me a documentation link that shows how to. im beginner in ACC i start working on it since 1 month but i m a web developper already. Thanks

Views

247

Likes

0

Replies

0
Re: How to create an adobe campaign List using a json arr...
Avatar

JamesAlio

JamesAlio
- Adobe Campaign Classic
Hello @_Manoj_Kumar ,Thank you so much for your response it's very clear.i still have one more question because in your response you assume that the list is already created ? there is any why to create the list (table) during the workflow execution i mean using my js code before start persisting the data? Thanks in advance.

Views

264

Likes

0

Replies

0
How to create an adobe campaign List using a json array of objects in a workflow
Avatar

JamesAlio

JamesAlio
- Adobe Campaign Classic
Hello,i have a workflow where i create a json array using javascript activity and i want to create a new adobe campaign list (using js code) and add to it all the data in my json array using "javascipt acitivity" or "update list" activity.can you please show me how i can achieve this operation in my workflow. this is the code of my Js activity : var arrayOfObjects = [{ "id": 28, "Title": "Sweden" }, { "id": 56, "Title": "USA" }, { "id": 89, "Title": "England" }];vars.arrayOfObjects = JSON.string...

Views

286

Likes

0

Replies

5
Likes given to