I have a AmpScript to create a Salesforce Object, which does not work. I want to create a new Lead record. Important is, that I have to create the Record Type: Tenant. In the Salecloud I can choose it by a drop down.
Must have fields are only: Status and Last Name.
But why does this not work:
enter %%[var @email, @gender, @language, @channel, @status, @record
set @email = "sebhansen83@gmail.com"
set @lastName = "star"
set @gender = "Male"
set @language = "German"
set @channel = "Optin"
set @status = "Open"
set @record = "Tenant"
set @result = CreateSalesforceObject( "Lead", 3, "RecordType", "Tenant", "LastName", @lastName, "Status", @status)]%%