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

CloudPage InsertData() shows 500 error message if data already exists in DE

$
0
0

How can I get the CloudPage not to go to the 500 error page if I am using InsertData() but the data was already existing in the Data Extension? It works the first time if it doesn't exist, but it the error appears if someone goes to the CloudPage a second time.

%%[VAR @Id, @FirstName, @LastName, @Address, @City, @State, @Zip, @Country, @InsertCountSET @Id = RequestParameter("Id")SET @FirstName = RequestParameter("FirstName")SET @LastName = RequestParameter("LastName")SET @Address = RequestParameter("Address")SET @City = RequestParameter("City")SET @State = RequestParameter("State")SET @Zip = RequestParameter("Zip")SET @Country = RequestParameter("Country")SET InsertData("Member_Address","Id",@Id,"FirstName",@FirstName,"LastName",@LastName,"Address",@Address,"City",@City,"State",@State,"Zip",@Zip,"Country",@Country)]%%

Viewing all articles
Browse latest Browse all 359

Trending Articles