The Dynamics AX Options from Tools menu allows users to define their preferred fonts and sizes for various application areas. In custom functionality, it might also be necessary to add similar options allowing configuring font properties.
In this recipe, we will add an option to select a font in the Form setup form in the Accounts receivable module for sales invoice layout. The code in this recipe could be used in conjunction with the code that reads this parameter and actually changes invoice font.
Open the CustFormLetterParameters table in AOT.
Property
Value
Type
String
Name
InvoiceFontName
ExtendedDataType
FontName
Add one more field:
Property
Value
Type
Integer
Name
InvoiceFontSize
ExtendedDataType
FontSize
Open the CustFormLetterParameters form in AOT, and add a new display method to the CustFormLetterParameters data source:
display Name displayInvoiceFont( CustFormLetterParameters _custFormLetterParameters) {; ...