Adler was present at Eidsvold as assistant and cabinet secretary of Crown Prince Christian Frederik of Denmark who was a proposed King of Norway. When Christian Frederik relinquishing the throne and returned to Denmark in late autumn 1814, Adler followed with him. In 1815 Christian Frederik was appointed governor of Funen and Adler became a member of his staff. After King Frederik VI of Denmark died in 1839, Christian Frederik ascended the throne as King Christian VIII of Denmark. Adler was appointed cabinet secretary, a position he held until King Christian died in 1848.