If every sales invoice to a customer should carry a department, put it on the customer. The system fills it in and refuses to post without it.
On the customer, vendor, item, G/L account, resource or employee card, Dimensions → Default Dimensions: dimension code, the default value, and Value Posting: blank (default only), Code Mandatory (any value, but must be filled), Same Code (must be this value), or No Code (must be blank). Set a default on the G/L account for overheads with Code Mandatory and no overhead posts without a department. Set Same Code on an intercompany customer and every entry carries the right partner.
Default dimensions by category (Default Dimensions – Multiple from a selection of items or customers) set many at once. The setup post explains the design.