You must apply to the Department of Civil Affairs for permission if you want to buy a non-permanent dwelling and you do not have domicile according to the Acquisition of Property Act, and you have not lived in Denmark for at least 5 years.
You can only be granted permission to buy a non-permanent dwelling if you have a particularly strong connection to Denmark.