Over at the Accidental Administrator, John Lowther demonstrates Setting up a department code
Setting up a department code (User Snippet) – Accidental Administrator
Development & IntegrationInstall, Upgrade & Admin
Archived post from 2012. Dynamics GP and the links it points to have changed since; check current documentation before relying on version-specific steps.