Warning message on the screen when “To date” is smaller than “From date”

By | February 28, 2022

Sage X3, is a complete business management solution designed to drive productivity and give you total control and visibility of your enterprise. With customizable configuration, the flexible solution equips you with everything you need to drive business success. Easy to understand all the modules.

Recently, we had a requirement from one of our client for a new insurance module, in which we have customized the company master and policy master screens to ensure the policy of the product. In policy master, there are “From and To date” fields that indicate the period between which the policy will remain active. After the “To Date”, the policy gets expires and will become in-active. This policy master will help users to top up their policy easily based on the “From and To date” fields. So, when the user enters “To date” and if it is smaller than “From date” then the warning message should be displayed on- the screen that ‘To date should be greater than From date’.

New stuff: How to make adding a functional authorization easier

We will see the functionality in detail:

Navigate to : More -> Insurance -> Insurance Set Up -> Insurance Company master

Insurance Company Master
Insurance Company Master

Initially, users have to create the insurance company and fill in all the details which are mandatory on that screen and once an insurance company is created then these company details will get fetched on the policy master screen automatically while creating the policy of the company in the policy master.

To Open the policy master screen – Navigate to: More -> Insurance -> Insurance Set Up -> Insurance Policy Master

To Date field
To Date field

If the user tries to select a date in the “To date” field which is smaller than the “From date” as shown in the above screenshot. Then the Warning message is getting displayed and it is not allowing the user will to create the policy as shown in the below screenshot.

Warning message
Warning message

As a result, the user cannot add further details on the screen and policy would not be created. In this way, we can restrict policy creation if “To Date” is smaller than the: From Date”.