Validate Project Code or Cost Center template

Use this template to create a business rule that locates invalid project codes or cost centers and replaces them with valid ones when a user submits an expense report, payment requisition, or timesheet. The template is used to configure a business rule that checks for the validity of any user free-type entered project code or cost center used in a line item allocation or a document allocation such as Travel Plans. This business rule is used in conjunction with allowing users to free-type the name or code of a cost center or project code rather than force the user to select the code from a chooser. This business rule can applied with Infor ER, Infor PR, Infor TP and Infor TS.

This business rule compares the user-entered string against a listing of active project codes and/or cost centers to which the user has access. If a matching project code or cost center is found and the object is both active and available to the user, using membership, the business rule updates the allocation object by replacing the user-entered object with the found non-user global object.

Infor TS retrieves project codes from lines, not from allocations. If the data is not found in data context, then the application retrieves the required record from the database.

You can add the charge code active status check by Project or Cost Center Validation business rule as a compliment to this rule. The base product's Project or Cost Center Validation business rule checks the free text charge codes specified by user, whether such charge code exists in database or not. If a charge code is selected from the MRU list, the system does not check whether it is an active code at that time. Sometimes when a user adds an expense line, its charge code can be active; however by the time the document is submitted such as after couple of days, that charge code can become inactive. The business rule removes any MRU entries associated with an invalid code entry.

Caution: 
Because this business rule replaces user-entered project or cost center codes with system codes, it must be placed first in the sequence of rules running on this event.

Using the business rule template Parameters tab, you can influence the business rule's behavior to validate either only project codes or cost centers or validate both objects and perform comparisons and lookups with or without case sensitivity. This business rule can verify the document level allocation of expense reports and payment requests after validating the line item allocations of these document types. (This last functionality is only available for ER and PR documents, since Infor TS does not have document level allocations and Travel Plans do not have line item allocations.) When validating a Travel Plan, the business rule merely compares the string in the document level allocation, since Travel Plans do not have line item allocations.

These parameters are displayed on the Parameters tab of the Edit Business Rules screen.

Validate Type
Select what to validate at the document and line item level. The validate type controls what you are checking. Select Both if you want the system to validate, free text entry, cost center codes and project numbers.
Case Sensitive Check
Select this check box to distinguish between lower-case and upper-case text in the Project Code or Cost Center fields. If not selected, the business rule converts user-entered codes to upper-case before testing them against codes in the system. A case sensitive validation check requires the users to type the numbers in exactly as it is in the system. This only applies to alphanumeric based codes. Numeric based codes are not be impacted by this additional restriction.
Validate Document Level Codes while checking Line Level (for ER & PR only)
Select this check box to validate Java-based document-level codes after line-level codes are checked. This parameter is used only when checking expense reports and payment requests.
Consider Inactive Codes as Valid
Select this check box to have the system consider inactive codes as valid.
External Key
Optionally, specify a unique ID. If your company uses the Expense Management Import tool to populate the Expense Management database, external keys are imported into the database automatically. See the Infor Expense Management System Administration Tool User Guide.

Example

This example shows how to set up a business rule based on this template to validate document project and cost center codes.

Validate project codes or cost centers fields

This table shows the values for fields:

Field Value
Name Validate Project Code and Cost Center
Severity Invalid
Notification Interactive Only
Fire on Itemization Not Selected
Fire Scope Everytime
Offline and Online Firing Options Fire Online only

As with most stop business rules, the business rule should be configured with an "invalid" severity and a notification of "interactive only". Because this rule relies heavily upon the online database for lookup functions the business rule must also be configured to fire "online only".

The business rule will reject and send the document back to the create activity if an offline-submitted document contains invalid codes. Since the business rule fires only in the "online" mode, the document reject would occur once the document is uploaded to the database.

Status Active
Policy Based Routing Leave Blank
Fire On <Multiple>

Validate project codes or cost centers strings

This table shows the values for strings:

Strings Value
Description The project codes you have entered: <invalids> are invalid. Please either enter valid project code or choose from the project code chooser.
Interactive Message The project codes you have entered: <invalids> are invalid. Please either enter valid project code or choose from the project code chooser. If the business rule finds an invalid code, the business rule will attempt to output a listing to the business rule's interactive and report message of all invalid codes. This is only possible if the business rule's configured interactive message contains the "%%20000:invalids%%" placeholder. The above placeholder, <invalids>, can be surrounded by additional customer desired text, but the placeholder must exist in the interactive message for the user to see a listing of invalid codes used in the document.
Policy The project code you have entered must be valid.
Report Message The project codes you have entered: <invalids> are invalid.

Validate project codes or cost centers parameters

This table shows the values for parameters:

Parameter Value
Validate Type Select a choice from the drop down box to indicate that Project Number Only, Cost Center Only or Both should be checked at the document and line item level. The Validate Type controls what you are checking. Select Both if you want the system to validate (free text entry) Cost Center Codes and Project Numbers.
Case Sensitive Check Check this box to distinguish between lower-case and upper-case text in the project code or cost center fields. If not checked, the business rule converts user-entered codes to upper-case before testing them against codes in the system. A case sensitive validation check requires the users to type the numbers in exactly as it is in the system. This only applies to Alphanumeric based codes. Numeric based codes will not be impacted by this additional restriction.
Validate Document Level Codes while checking Line Level (for ER & PR only) Check this box to validate document
Consider Inactive Codes as Valid Check this box to have the system consider inactive codes as valid.

User is create and review proxy applications, organization or group

This table shows the values for applications:

Name Organization/Group
Default Company Group You will want to assign membership to the business rule in a group that will cause it to fire for all users in the system. You can restrict when the rule fires based on the membership you assign to the business rule.