1

I created a landingpage where it is saving to a data extension. We entered a custom _errorPage, but when we fill in a existing email address it is always giving is &ErrorCode=2. Why is that??? Following the documentation here: http://help.exacttarget.com/en/documentation/exacttarget/subscribers/web_collect/#section_23 it is saying that entering the same data must give us error code 8 right??

The errorcode 2 is: ""The list provided does not exist".", but we don't do anything with a list on the landingspage.

This is the ampscript for the processing:

VAR @de, @de_col, @de_statusCode, @de_statusMsg, @errorCode

SET @de = CreateObject("DataExtensionObject")
SetObjectProperty(@de, "CustomerKey", "")


IF NOT IsNull(RequestParameter("email")) THEN
    SET @de_col = CreateObject("APIProperty")
    SetObjectProperty(@de_col, "Name", "email")
    SetObjectProperty(@de_col, "Value", RequestParameter("email"))
    AddObjectArrayItem(@de, "Properties", @de_col)
ENDIF

IF NOT IsNull(RequestParameter("bedrijfsnaam")) THEN
    SET @de_col = CreateObject("APIProperty")
    SetObjectProperty(@de_col, "Name", "bedrijfsnaam")
    SetObjectProperty(@de_col, "Value", RequestParameter("bedrijfsnaam"))
    AddObjectArrayItem(@de, "Properties", @de_col)
ENDIF

IF NOT IsNull(RequestParameter("contactpersoon_voorletters")) THEN
    SET @de_col = CreateObject("APIProperty")
    SetObjectProperty(@de_col, "Name", "contactpersoon_voorletters")
    SetObjectProperty(@de_col, "Value", RequestParameter("contactpersoon_voorletters"))
    AddObjectArrayItem(@de, "Properties", @de_col)
ENDIF

IF NOT IsNull(RequestParameter("contactpersoon_voornaam")) THEN
    SET @de_col = CreateObject("APIProperty")
    SetObjectProperty(@de_col, "Name", "contactpersoon_voornaam")
    SetObjectProperty(@de_col, "Value", RequestParameter("contactpersoon_voornaam"))
    AddObjectArrayItem(@de, "Properties", @de_col)
ENDIF

IF NOT IsNull(RequestParameter("contactpersoon_tussenvoegsel")) THEN
    SET @de_col = CreateObject("APIProperty")
    SetObjectProperty(@de_col, "Name", "contactpersoon_tussenvoegsel")
    SetObjectProperty(@de_col, "Value", RequestParameter("contactpersoon_tussenvoegsel"))
    AddObjectArrayItem(@de, "Properties", @de_col)
ENDIF

IF NOT IsNull(RequestParameter("contactpersoon_achternaam")) THEN
    SET @de_col = CreateObject("APIProperty")
    SetObjectProperty(@de_col, "Name", "contactpersoon_achternaam")
    SetObjectProperty(@de_col, "Value", RequestParameter("contactpersoon_achternaam"))
    AddObjectArrayItem(@de, "Properties", @de_col)
ENDIF

IF NOT IsNull(RequestParameter("bron")) THEN
    SET @de_col = CreateObject("APIProperty")
    SetObjectProperty(@de_col, "Name", "bron")
    SetObjectProperty(@de_col, "Value", RequestParameter("bron"))
    AddObjectArrayItem(@de, "Properties", @de_col)
ENDIF

IF NOT IsNull(RequestParameter("contactpersoon_geslacht")) THEN
    SET @de_col = CreateObject("APIProperty")
    SetObjectProperty(@de_col, "Name", "contactpersoon_geslacht")
    SetObjectProperty(@de_col, "Value", RequestParameter("contactpersoon_geslacht"))
    AddObjectArrayItem(@de, "Properties", @de_col)
ENDIF


SET @de_statusCode = InvokeCreate(@de, @de_statusMsg, @errorCode)

IF @de_statusCode != "OK" THEN
    RaiseError(@de_statusMsg, 0, @de_statusCode, @errorCode)
ENDIF

What i want to do is creating a error page what is saying more then, "There went something wrong.".

1 Answer 1

2

You need to provide the Data Extension name you want to insert the record into:
SetObjectProperty(@de, "CustomerKey", "DATAEXTENSIONNAME")

1
  • Also note that if you didn't give the Data Extension a Customer Key you will need to use the GUID that gets assigned automatically. I'd suggest giving the Customer Key the same value as the Data Extension Name. Oct 20, 2014 at 20:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .