Question

check before saving

Hello community,

I want to prevent adding new record if type for example match condition 

how can I do that, by business role ? or by business process and how 

 

thanks in advance 

kareem abdeltwab.

Like 0

Like

3 comments

Can you please elaborate on the use case?

I want to Prevent user to add a new record if type  which is lockup  equal National  for example how can I do this 

Hi Kareem,

There are multiple ways to implement such a validation. 

First of all, you can implement a validator on the attribute to make sure that it meets the needed criteria. More on validators on freedom UI here.

The second way is to implement a backend validation using the event litener. You nee to implement an event listener (more information about it here) and implement override OnInserting method where you can check for your requirements. I'd personally recommend use the frontend validation as it gives the user the immediate feedback on what they can and cannot do.

 

Best regards,

Yuri

Show all comments