Accounting Preferences
It's possible to enable per-line classifications in the Accounting Preferences.
To enable per-line classifications:
- 
              Go to Setup > Accounting > Accounting Preferences. 
- 
              On the General subtab, go to the Classifications section and check the Allow Per-Line Departments or the Allow Per-Line Classes box, as per requirement. 
- 
              Click Save. 
In addition, you may need to enable these transaction line fields on your respective custom form (Customization > Forms > Sublists).