When we sync a new Prospect to a Salesforce Lead, we get
Field Integrity Exception: A country/territory must be specified before specifying a state value for field: State/Province
Now when we inspect the Prospect, we indeed see that the State contains an invalid value "Not applicable".
So I created a "Before Insert" Trigger in Salesforce that sets the State field to Null if it is invalid. The Trigger works, and if we sync the Prospect to Salesforce I see in the debugging that the State and StateCode fields are Nullified in the Before Trigger.
All in all, the Salesforce logging shows no error. After we nullify the State field, the Lead looks fine.
However, we still get the same error message in Pardot, and consequently the Lead is not inserted into Salesforce. Any clue? What can I investigate?