Skip to main content
samadritam1018
February 10, 2023
Question

Validate on Update related action

  • February 10, 2023
  • 3 replies
  • 0 views

I have used validation while creating a new entry in the grid which shows a message in case of duplicacy in entered field. But when I use the same validation in the update related action , it shows the duplicacy message  as soon as we click on update, even before actually updating it. How to resolve this? I want validation to occur when i enter the data, not when I it automatically loads the data

3 replies

February 10, 2023

You can use a!validationMessage() to show a message on submit.

samadritam1018
February 10, 2023

No, actually, the moment I click on update i can see the validation message although I havent made any changes because the previous value is stored in the record

February 10, 2023

I think this can be done using a local variable, just initialize the local variable say local!clicked to false and in the saveInto list of button just update the variable to True, and show your validation with a condition based on the value of "local!clicked". Hope this will be helpful.