Before we get started, the best place to try all this is in your SAP Business One test company database.
In the case of a header/body style UDF, let’s take the example of adding a unique field to the item master record. In this case, our company sells electronics items and some of these items require a require a recycling fee deposit, and some do not. We’d like to track which items this fee applies to, and which items are exempt. We start by opening up our UDF management window as show below, and finding the Items sub-menu under the Master Data menu. If we expand the Items list, we see that there are a number of additional third level options for where to put a UDF, however, in this case we’re simply going to select the Items row by clicking on the line and highlighting it. We know we’ve chosen the correct line as the line will highlight in yellow, and the buttons in the bottom right hand corner become active. One of those buttons will say Add, click it.
Once you click Add you should see a screen like this:
This field will allow you to give your UDF a short name (title), a long description (description), and then specify what type of data is in the UDF (alphanumeric, numeric, date/time, units and totals, general). You can also specify field length here as well as talk about what Structure the data has (IE general, telephone number, etc). The validation field allows you to do more advanced validation on what’s in the UDF. The most basic example of what you can do here, is that you can create a list of valid values that can be used in the UDF. In our example, an item is either recycling fee applicable, or not applicable, so we can create a drop down list in the UDF that only allows the end-user to pick these two options. It should be pointed out that you don’t have to use data validation, that is to say, the UDF can just be an open field to type free form data. Lastly, we can specify whether or not this UDF is mandatory (needs to be filled out), and if there is a default value that get’s populated in the field if nothing else is entered.
The above screenshot is an example of how we’d use the UDF creation box to make the field we want for tracking the applicability of a recycling fee.