Message Pop Up when Duplicate Flag is Checked

We have table which has a field for Duplicate Record Flag which is activated when a record is entered that has similar data elements with an existing record.We would lie a message to pop up upon selection of the Edit link for that record (This is how the record is approved).Please see my attempt which was not successful// Row Rendering event
public void Row_Rendering() {
if DuplicateFlag.EditValue = ‘1’
{msg = “This may be a duplicate entry, check the control tab for details”;
}Thank you,

  1. The syntax of your codes is not correct. You should enclose the condition for if with brackets (i.e. if (…)).
  2. You should use the Form_CustomValidate server event to validate fields. Please refer to examples in:
    https://aspnetmaker.dev/docs/#/customscripts.html

Thank you for your response. We implemented the code below, but no message is displayed even when the duplicate falg is checked// Form Custom Validate event
public bool Form_CustomValidate(ref string customError) {
//Return error message in customErrorif (ConvertToInt(DuplicateFlag.EditValue) == 1){
// Return error message in customError
customError = “This may be a duplicate entry, check the control tab for details.”;
return true;
}
//return false;}

You should return false if validation failed. Otherwise return true.

I updated the scode as below and enabled server sdie validation but no message pops up// Form Custom Validate event
public bool Form_CustomValidate(ref string customError) {
//Return error message in customErrorif (Convert.ToString(DuplicateDisposition.EditValue) == “Duplicate Found”){
// Return error message in customError
customError = “This may be a duplicate entry, check the control tab for details.”;
return false;
}
return true;}

Open your project with Visual Studio 2019 or later, add a break point in the Form_CustomValidate server event and see why it is not working.