I have a French Coconut pie recipe that calls for 1/2 cup butter. Could I replace it with condensed milk instead?
Butter is about 80% fat, maybe a bit lower if you're getting it direct from the farmer; condensed milk is about 10% fat, so you'd need to use a lot of condensed milk and you'd probably have too much excess water to compensate by reducing extra liquids.

The best substitute would be another fat which is solid at room temperature. There aren't many (at least, not if you restrict to vegetable fats), but one which does meet the criterion is coconut oil, and since you're making a coconut pie that seems like an excellent substitute.