We have a validation rule on creating contacts which forces the Account Name to be set. When creating the Contact using AMPScript how do I set the Account to be the value I want? (This can be a hard coded Account as we only use one).
I have tried setting the AccountId but this doesnt get past the validation rule.
CreateSalesforceObject("Contact",8,"FirstName",@firstName,"LastName",@lastName,"Email",@email,"Gender__c",@gender,"MobilePhone",@mobile,"Recieve_HTML_Emails__c",@emailTxtImage,"Receive_Text_Emails__c",@emailTxt,"Receive_SMS__c",@sms,"AccountId","TESTID")
Tried setting Account to TEST even though this is not a field on contact record.
CreateSalesforceObject("Contact",8,"FirstName",@firstName,"LastName",@lastName,"Email",@email,"Gender__c",@gender,"MobilePhone",@mobile,"Recieve_HTML_Emails__c",@emailTxtImage,"Receive_Text_Emails__c",@emailTxt,"Receive_SMS__c",@sms,"Account.Name","TEST")
Here is the validation Rule
Account.Name <> "TEST"
I have also tried changing the Validation Rule to be on the AccountId but this doesnt work when saving the contact through Salesforce.
Any help appreciated. Cheers