The samples and information below is provided without a warranty of any kind. This post is for informational purposes and coresystems ag assumes no responsibility for errors or omissions in the information provided.
This rule if for the Brazilian localization but it could be adapted to other localization.
Attached is one rule that will validate the zip code on the BP Addresses tab to conform with the Brazilian ZipCode format (CEP).
The templates require coresuite Version 3.50 or higher, and SAP Business One 8.8 or higher.
Procedure to use these templates
1. Download the attached BUP_10173_Validat... file
2. Import in SAP Business One via > Administration > Add-Ons > coresuite customize > Import / Export > Import rules.
In the message box, select “All Active”. Click on “Import”.
To check the rule in action:
Just edit a business partner address and change the zip to an invalid Brazilian zip code.
The correct format should be XXXXX-XXX where X is a number from 0 to 9.
Procedure to adjust these templates
This rule can be adjusted to validate any type of zip code format as long as the correct REGEX string is used. This string may be found on the internet.
Preview Sample (Optimizer Rule REGEX):