Quantcast
Channel: Active questions tagged ampscript - Salesforce Stack Exchange
Viewing all articles
Browse latest Browse all 359

Send data from one CloudPage to Another

$
0
0

I have a cloudpage that register some customer infos(Fname, Lname, Id...), and theses info needs to be transferred to another CloudPage in order to display the correct Content for that Customer, I'm still a beginner, so I don't really know how to perform that, I tried to use the code below, but it didn't work for me.

my data is json, but before sending it, I parse it and take the id I want and it becomes smthg like this: id=1234

First Page

    Platform.Load("Core", "1.1.1")    var req = HTTP.Post('https://target-page', 'text/html', id , ['Accept-Encoding'], ['identity']);    if(req.StatusCode == 200) {       Write('HTTP request was successful');    } else {       Write('HTTP request failed');    }</script> 

Target page

<script runat="server">var data = Request.GetFormField("id"); data = Platform.Function.ParseJSON(data); Write(Stringify(data));</script

Viewing all articles
Browse latest Browse all 359

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>