I’m planning to use container gardening to grow tomatoes this summer. Do they have to be outside at a certain point to be pollinated? Or can I keep them inside in a sunny spot and have them grow fine?

I’m planning to use container gardening to grow tomatoes this summer. Do they have to be outside at a certain point to be pollinated? Or can I keep them inside in a sunny spot and have them grow fine?