Business Functions
Business functions define the logic for the smart field. You can use either C business functions or named event rule business functions. C business functions are written in C language, while named event rule business functions are written in scripting language using the JD Edwards EnterpriseOne toolset. Named event rule business functions are also referred to as named event rules (NERs).
The advantage of using business functions is that they are reusable. The code is written once and can be used in multiple events and reports. For example, without the business function for Quarterly Amount, you would write four event rules, adding together the appropriate periods for each of the four quarters. In contrast, if you use an NER you can write the criteria once and reuse it for each of the four columns that displays a quarterly amount. You can also use this same NER in other reports that require quarterly sale figures.
The event rules scripting language used for creating NERs is platform independent. NERs are stored in a database as a JD Edwards EnterpriseOne object. When you build NERs, the system generates C code and creates .c and .h files.
A NER is a business function object. When you create a business function, you have the choice of which source language to use. The source language options are C and NER. Your selection determines which tool the system presents.
As with any business function, you need to associate a data structure with an NER.
You create the logic for NERs using the Named Event Rules Design form. This form is similar to the Event Rules Design form used in RDA. In the Named Event Rules Design form, you can create event rule logic for each valid user prompt value. It is good practice to include a default statement. For example, the logic for quarterly amount might state that if any value other than 1, 2, 3, or 4 is entered into the user prompt, the first quarter is calculated by default.
See "Using Business Functions" in the JD Edwards EnterpriseOne Tools APIs and Business Functions Guide.