1

In activities I am running this script:

<script runat="server">
Platform.Load("Core", "1.1.1")
var NewReq = HTTP.Get("http://samplesite.com/sample.html");
</script>

It always throws errors. It is calling a cloud page with ampscript, which separately works like intended if loaded manually:

<!DOCTYPE html>
<html>
<head>
<script runat=server>
Platform.Load("core","1");
HTTPHeader.SetValue("Access-Control-Allow-Methods","GET","POST");
HTTPHeader.SetValue("Access-Control-Allow-Origin","*");
</script>
%%[
var @now
set @now = Now()
var @rowCount, @rows, @row, @signupdate
set @rows = LookupRows('trigger_DE','Count', '1')
set @rowCount = rowcount(@rows)
if @rowCount > 0 then
for @i = 1 to @rowcount do
set @row = row(@rows,@i)
set @signupdate = field(@row,"last_activity_time")
set @expireTime = DateAdd(@signupdate, '10','MI')
if @now > @expireTime then
DeleteData('trigger_DE','last_activity_time',@signupdate)
endif
next @i
endif
]%%  
</head>
<body>
</body>
</html>

So why doesn't the script that calls the cloudpage work?

3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.