If you have joint custody and agree on the child’s residence, you can make an agreement between yourselves as to which of you the child shall have residence with. You need not involve the Agency of Family Law in such agreements.
When you have joint custody, it is the resident parent who decides where in the country the child shall live. However, if the child is to move abroad or to Greenland or the Faeroe Islands, you shall be in agreement on such.
If one of you has sole custody of the child, it is that parent who decides where the child shall live, in purely geographical terms. This applies both in Denmark and abroad.