All Questions
73 questions
4
votes
1
answer
4k
views
Can you retrieve more than 2500 records with SSJS?
I am trying to use a script activity to update a data extension with the statuses of subscriber records. I have managed to get the code working but it will only add 2500 records. I have been reading ...
3
votes
1
answer
1k
views
Scripting language in ExactTarget
Disclaimer - Newbie to ExactTarget and AMPScript
Aside from Javascript and AMPScript, what languages (if any) are accepted as scripting languages in ExactTarget?
We have a Content Area full of a ...
3
votes
1
answer
656
views
Bracket notation in SSJS (in the Marketing Cloud)
I have a script that is retrieving rows from a data extension and then looping through said rows.
The data extension is coming from a SF report so I can't edit the column names without copying it to ...
2
votes
2
answers
2k
views
SSJS Activities : Move Data Extentions in a Folder
I'm investigating the SSJS activities. I'm not a JavaScript programmer but I'm trying to learn. Now I have managed to create Date Extension, a Create a folder path. Now I would like to be able to ...
2
votes
1
answer
3k
views
Server-Side Javascript & Ampstript for Emails
I've been reading that combining ssjs and ampscript isn't the greatest with in emails -- Slows down the load speed.
Wondering if that would apply when just creating a script to pull data from a DE ...
2
votes
1
answer
1k
views
Is it possible to use Ajax to POST data from within a Server-Side Javascript in the Marketing Cloud?
Is it possible to use Ajax to POST data from within a Server-Side Javascript in the Marketing Cloud?
Could the FormData be a problem?
I've been using this code:
var form = new FormData();
form....
1
vote
2
answers
4k
views
Retrieve All Subscriber Status
I am working on a custom profile center and I'm using server side javascript to extract information about the lists a subscriber is currently subscribed to. When I use the lists.retrieve function it ...
1
vote
2
answers
2k
views
Trying to trigger an automation from different Business unit using SSJS Activity
I have written the below code and created one test scheduled automation to start the automation. I didn't get any error when i did scheduled/publish the code but my automation is not starting. and i ...
1
vote
1
answer
3k
views
How to access client side javascript variable in SSJS?
I am facing difficulties in showing a message. Below is the problem statement :
I have six textboxes on a cloud page which stores six digit coupon code(one digit each). I am trying to show a error ...
1
vote
1
answer
572
views
Pass value from Ampscript to SSJS Sleep function
I have ampscript value which defines how many milliseconds the function should delay the process but can I pass that 'ms' value from ampscript to sleep(?). Below is my script
%%[
var @ms
set @ms="...
1
vote
1
answer
471
views
SSJS redirecting to wrong page
I have a processing cloud page and the page redirects correctly to success page but when I add in extra bit of code for error page redirect, records evaluating success still goes to the error page. Am ...
1
vote
2
answers
5k
views
SSJS Update and Perform Query Definition
I am attempting to loop through data extension content to dynamically update and perform a query definition. Essentially, I'd like to update and run the same Query Definition synchronously using SSJS ...
1
vote
1
answer
189
views
How Do I Break Down a JSON Array Format CSV Column Into Individual Columns Within SFMC Data Extensions?
I have an interesting use-case where I am getting a Data Extension from CDP where one of the columns is in JSON Format.
Now I want to break down the last column of this DE into its individual columns....
1
vote
1
answer
4k
views
SSJS Split String
How to use split function in SSJS to split String?
In my case, I have given the String and , the way I want to split is as follows :
My String : I want 2 splits
dfc_1 : dfc_ and 1
dfc_45932 : dfc_ ...
1
vote
1
answer
748
views
Send personalized SMS in Marketing Cloud with javascript
We need to send a personalized SMS to a group of contacts. We made a working block of code that does that, but we call the server for each SMS like this:
var sendSMSResult = HTTP.Post(sendSMSEndpoint,...
1
vote
1
answer
4k
views
Best way to make HTTP Requests
We are inserting data to a Data Extension in ExactTarget. Now on that same form submit action we have to POST that data to an Internal RESTful service (message format and responses are in JSON). Can ...
1
vote
2
answers
1k
views
JSON call using SSJS to populate a dropdown list in HTML and pass it through using AMP
I have a JSON object full of County names and I want to call it using SSJS then populate a dropdown list in HTML using the Data from the JSON.
JSON looks like this
[
"AZ - Maricopa",
"AZ - ...
1
vote
0
answers
304
views
Fetch form values from localStorage to SSJS script
I am trying to resolve an issue of a scenario in which two cloud pages are created, for example, Page A contains a form with multiple fields, while Page B contains SSJS code to send the data to the ...
1
vote
1
answer
152
views
ERROR "Unable to retrieve security descriptor for this frame." When using WSPROXY's createitem with JSON object any tips?
So, I've been testing some use cases with SSJS and got into this error "Unable to retrieve security descriptor for this frame." which occurs with the
apiAudiencia.createItem("...
1
vote
0
answers
425
views
Error from Rows.Add
I have the following script that returns the array as expected. When I go to add the "Rows.Add" aspect, I get a 500 error. I am testing the script on a cloudpage with plans to move it to an ...
1
vote
0
answers
691
views
How to wait untill UpsertData is done using SSJS?
I'm running a for loop to update some DE records.
Since the LookupRows is limited to 2000 records, we sometimes need it to iterate again.
Therefore the for loop is in a while loop.
Rows are marked in ...
1
vote
1
answer
118
views
Send progress of CloudPage back to browser during AJAX request
I'm processing CSV files with a CloudPage. I upload the CSV file, then stringify the array, and send it via AJAX to another page. Previously, I had been doing this row by row so that I could show a ...
1
vote
0
answers
820
views
Script Activity Outputs
I creasted a SSJS in Marketing Cloud under --> Automation Studio --> Activities --> Script , I was curious to know how I can view the results of Write statements in the script?
I am able to store data ...
1
vote
0
answers
658
views
SSJS script activity not updating Query Definition as expected
I am trying to update a query definition in Marketing cloud using SSJS script which updates the query based on the datestamp. When I run the script, I don't get any error but it does not seem to be ...
1
vote
0
answers
826
views
SSJS - Read a Data Extension after an Rows.Update
i'm now in my firsts baby steps in JavaScript on Salesforce Marketing Cloud.
In my script i read one Data Extension with an DataExtension.Init("DE") and a DE.Rows.Retrieve(filter).
After this, some ...
1
vote
0
answers
481
views
Server side Javascript in Marketing Cloud not updating data correctly
I am trying to update data in a data extension using a SSJS activity in automation studio. I've debugged the code in a browser and everything seems to be working correctly but when I run the activity, ...
1
vote
2
answers
698
views
How to extract headers from data extension?
Say the table I'm working with has firstName and date as the only two column headers, with rows of data. Something like,
| firstName | date |
--------------------------
+ Robert | 2018/01/...
1
vote
0
answers
855
views
Upload images to portfolio using Server Side JavaScript
I have a simple html file upload page, an example snippet of the code below.
<html>
<body>
<form action="<ExactTarget page with ssjs file handling>" method="post" ...
0
votes
2
answers
6k
views
SSJS Rows.Retrieve not returning any rows
I'm having an issue where I'm unable to retrieve any rows from a DE that I know is populated inside an automation.
Here is my code:
<script runat="server">
Platform.Load("core","1");
var ...
0
votes
1
answer
1k
views
How to fetch a variable declared in ssjs script into client side script
I am storing the value of lookup function into a variable say " var temp;"
In ssjs script.
I want to fetch this variable in client side script.
I am using
Console.log(<ctrl:var name=temp /...
0
votes
1
answer
316
views
Save API Call Response
I need to create a job that monitors the delete jobs that are running in our BU every day. I managed to use this API (https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/...
0
votes
1
answer
521
views
Is it possible to execute ampscript or ssjs onchange via checkbox check/uncheck
As I wrote in the question title I was just wondering if a block of ampscript & ssjs combined code can be execute on change via checkbox check/uncheck?
<input name="TopicID" type=&...
0
votes
1
answer
1k
views
SSJS script to update query and start automation with 3 minute wait in between each loop iteration
I have a script that have nested loops that loop through some arrays. In those loops, I have a something that updates a SQL Query Activity, then something to start an automation.
What I am trying to ...
0
votes
1
answer
2k
views
ParseJSON Error for HTTPPost - SSJS Unable to retrieve security descriptor
In my marketing cloud, landing page. Getting the error "System.InvalidOperationException: Unable to retrieve security descriptor for this frame" while trying to Parse the JSON response in a HTTP Post ...
0
votes
1
answer
5k
views
SSJS activities: Clear Data from Data Extensions
I am trying to write a code in SSJS to clear all data in a Data Extensions
Below a sample code
<script runat=server>
Platform.Load("core","1");
var CAMPAGNE= DataExtension.Init("...
0
votes
1
answer
795
views
Marketing cloud page insert row using onclick event
I have this image
<img src="%%=v(@link)=%%" onclick="registerClick()">
and the following function
function registerClick(){
alert('click');
%%[ outputline('OUTPUT') ]%%...
0
votes
1
answer
2k
views
i have created a simple html survey form how to get radio buttons values selected by user to a data extension [duplicate]
i have created a simple html survey form under cloudpages which constains several questions with radio buttons and some with text boxes for answers. I want to know how to get radio button's values ...
0
votes
1
answer
3k
views
Reference SSJS Code Resource in your Landing Page
I've been trying to insert/reference an SSJS code resource in my landing page but using the CloudPagesURL(123) function doesn't seem to work? I've been using the function when referencing javascript ...
0
votes
1
answer
1k
views
SSJS and AMPscript
I'm trying to output message if there is an error and i have very little knowledge in javascript in general.
Could I get some feedback on if the following would work or how I would go about :
If ...
0
votes
1
answer
1k
views
How do I sort a rowset with Server Side Javascript linked with AmpScript?
I'm using AmpScript to make a custom email and I need to sort rows to display them in order of date. I saw that I can use Server Side Javascript to make this, but my variable in ampscript is a rowset, ...
0
votes
2
answers
2k
views
SSJS Activities: Create Folder path
I am writing to know how can I do several actions on a Data Extension and Create Folder using Javascript by SSJS
Currently I can not create a folder.
I do not understand what is the problem .
By the ...
0
votes
1
answer
560
views
Is it possible to get personalization strings when pulling content from DE with Server-side JavaScript in emails?
I'm trying to use server-side JS to dynamically write variables based on the column headers of a data extension for an email. Then fill those variables with the row contents of those field headers.
I ...
0
votes
1
answer
62
views
JS Code in Browser AND Server
Is there any practical way to write JavaScript functions such that the same code can be executed in BOTH a Landing Page written in AMPscript AND SSJS executed on the server (other than copying the ...
0
votes
1
answer
86
views
Programatically update the "Used for Sending" value for DEs in folder and all child folders
I'm attempting to update the "Used for sending" value for all DEs in a select folder and include the DEs in all the child folders.
I've written the code below that passes valideation, but I ...
0
votes
1
answer
77
views
How to update Data Extention row without creating a new record
i am very new for marketing cloud and I am having this problem.I have a Data Extention containig a list of Subscribers with their email and subscriber key.I build a form working well, which can post ...
0
votes
1
answer
208
views
Using MC Data Extension to update HTML on Landing Page [closed]
Is it possible to pass HTML code through a Data Extension value to set the HTML for an AmpScript Landing Page?
0
votes
1
answer
640
views
UpsertDE function not working on Shared Data Extension using SSJS from child BU even though used ENT
I want to use UpsertDE function on Shared Data Extension using SSJS from child BU. Even I tried ENT. before DE name, I have received 500 error in cloud page and script activity is getting errored in ...
0
votes
1
answer
1k
views
How to configure a cloud page to be inaccessible to public in SFMC
Currently, I have built a cloud page in SFMC that is being used for custom report.
Goal is to make it private / inaccessible to public so only SFMC users can access it.
Out of scope options:
Private ...
0
votes
1
answer
366
views
Why does my publication list array return undefined in Vuejs?
I'm learning to build a custom preference centre and trying to display all the lists for a subscriber. I retrieved all the lists like below:
<script runat='server' type="text/javascript"&...
0
votes
1
answer
694
views
Can I trigger a specific step of automation I want to start ? Using SSJS
I have this code that Start my automation, but I also would like to say what of steps start and finish
Like : I just want that step 3 start and finish
Follow the code:
<script runat="server&...