02 - Advanced Use of Mandatory Fields
02 - Advanced Use of Mandatory Fields
Summary
Module Mandatory Fields
Level Medium
Requirements B1UP 2.000 or higher
Scenario
Customer wish to make sure that Customer Reference Number, Sales Employee on a Sales Invoice are
entered and at line level the customer wish that every line have a profit center.
Data
Quality
Needed Configuration
1. A mandatory fields configuration that holds information of the 3 fields that should be checked.
The function button we are planning for this should be located on the Sales invoice so the first thing we
need to do is find the Formtype of this window.
If you do the above on the Sales Invoice you will see that the formtype is 133 which is the first thing we
need for our configuration.
Now we need to create the configuration. This is done by navigating to Administration > Add-Ons > B1
Usability Package > Module configuration > Mandatory Fields: Configuration
NB: IF YOU DON’T HAVE THIS OPTION YOU WILL NEED TO ACTIVATE MANDATORTY FEILDS IN THE MAIN CONFIGURATION
(ADMINISTRATION > ADD-ONS > B1 USABILITY PACKAGE > B1 USABILITY CONFIG)
The configuration window always start in find-mode so in order to add our configuration switch to add
mode (CTRL + A) and enter the needed formtype 133 and press TAB.
Next thing we need to do is to find the Item UID of the 3 fields we want to make mandatory
We now know that we need item 14 (Customer Ref. No.), Item 38 (Item matrix) with column 30 (Profit
Center) and item 20 (Sales Employee).
3x
There are two things we need to notice compared to the basic sample
1. Since Profit Center is data on line level an item value is not enough. Item 38 is the Item matrix
2. Sales Employee is special to make mandatory since there is no way to have an empty value.
However there is a value called “– No Sales Employee –“
If we take a close look at the system information we notice that the “– No Sales Employee –“ have
the internal value of -1, and that is the reason we enter -1 in the configuration in the Empty value
column since we would like to point out that value “– No Sales Employee –“ is the value indicating
that we have not chosen a sales employee
Now the configuration for this sample is complete and we can add the configuration.
Use of functionality
Now if we go to the Sales Invoice window, choose a BP and enter a few item lines
Now if we press add the Mandatory Fields Configuration will check entered data compared to what is
mandatory and see that customer Ref No, Sales Employee and Profit Center is missing.
For the sample, we then try to provide all missing data, but forget a profit cent for one of the 3 lines and
press add again
The configuration will now see that we still need a profit center for one line and inform the user of this.
First when we have provided all data for all lines will we be able to add the Sales Invoice.