I created an App Store archive file. During validation it raises an error with the following message
Please make sure that you have set up a record f
That error indicates that either there is no application in your iTunes Connect account with the bundle id of your application, or the application that is there is not in the "waiting for upload" state.
I've just been through the same problem and resolved it quite easily.
Through iTunes Connect the app has to be in the state of 'waiting for upload'. At first I thought 'prepare for upload' was sufficient but not so. Thus you need to go through the questions about have you changed encryption and how you want the new version released etc.
Once you've been through this section of Connect then the app is in the correct status of 'waiting for upload.' My validation of my app then just went straight through.
There is one other explanation for this. You are validating with wrong email/password. It can easily happen when you are working for more clients.
To be more precise. Here's how you move your app to the "Waiting for Upload" status...
Starting from the "Manage Your Apps" window in iTunes Connect, click the big icon for your app.
That will bring you to the "App Information" and "Versions" window.
In the Versions section click the View Details button.
In this next window there should be a button on the top right that says something like "Upload Binary." Click that button.
There's where you answer about encryption. Answer those questions about encryption and your app should be moved to the Waiting for Upload status.
Go back to the App Information Versions window. It should say "Waiting for Upload" in the Versions section.
Nowadays you will be informed specifically if you have a Bundle ID mismatch when you try to do the upload from your Xcode organizer. It'll even tell you which Bundle ID you have in iTunes Connect and which Bundle ID your app has.