Question

Business rules to check if table date is a holiday/weekend

  • 22 December 2022
  • 2 replies
  • 107 views

Badge +2

Hi Team,

We need to use business rules to validate whether the Task Date field (for example, Appointment Start Date) falls on weekend/holidayor not. We are aware that we can use validation business rules in FSM in order to check certain conditions on task update.

 

Can you please advise on how the above requirement can be acieved using out of box approach in FSM. In case if it is not achievable through business rules, then can this be advised through customization?

 

Regards,

Raghul G


2 replies

Badge +1

Hi Raghul,

  1. You can create an SQL Table or VIEW containing all the Weekend/Holiday dates.
  2. You set the value of task.plan_start_dttm to a task.user_def_dttm1 field, which should have a mask_type of “DATAEONLY” via a value BR before INSERT/UPDATE and if plan_start_dttm is changed
  3. Then you create a custom metadata join relation to that view via task.user_def_dttm1=your_custom_db_table.date_field  (date of the weeked/holiday)
  4. You create a validation BR before “INSERT/UPDATE” of the task.table whenever the task.user_def_dttm1 is changed and check if your_custom_db_table is being resolved.
  5. If this is a case you fire the Validation BR.

BR. Andrei V.

Badge +2

Thank you for replying, can you please advice how to we check if your_custom_db_table is being resolved in the BR ?

Reply