Generating the Position Code automatically when creating a new position will ensure consistency and avoid data entry issues. The autogeneration of position code can be defined differently, based on position attributes, like the Country of the Company. So positions could include US, DEU, ESP, PT or other, in the position code, depending on which country the position is assigned to. But there are multiple variables that customers can leverage adding the different conditions in the business rule.
There are some requirements and steps to complete in the system to generate position codes:
- Create the numeric sequence from Manage Sequence or Manage Data. Multiple sequences can be created and be included in the business rule, which could be different based on country, department or any other position attribute. For example, positions in US could follow a sequence (US_POS10, US_POS20, US_POS30...) and positions in Germany could follow a different sequence (DEU_POS25, DEU_POS30, DEU_POS35 and so on).
- Create a Business Rule in the Rules for MDF Based Objects scenario, with Position as Base Object and Evaluate as the Purpose.
- Assign the Business Rule in the Position object definition, under Save Rules.
- Set the code field (externalCode) as read-only in the Position object definition, so it's no longer editable and follows the business rule to autogenerate codes.
- Set to "Yes" the flag Position External Code Generation by On Save rule in Position Management Settings→General.
Hint
Based on the customer requirements, the following external link will help on deciding which pattern should be used in every scenario to generate position codes, and include it as a template in the business rule. https://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html







