1

I have a user object which is using pfc services. Now, during update, I have written my validation code in the pfc_validation() function, and when validation does not succeed, I am returning -3 from that function. But still I am getting an error message saying - "A database error has occured.....", which means the update process is not aborting. I thought if I return -3 from the pfc_validation function, it will stop the further update process.

Now how can I cancel the rest of the pfc_save process if validation fails?

Hugh Brackett
  • 2,706
  • 14
  • 21
MD Sayem Ahmed
  • 28,628
  • 27
  • 111
  • 178

1 Answers1

2

If your datawindow inherits from pfc_u_dw, you will see there (in the ancestor's pfc_validation event) that:

-1 = validation failed

Make sure that you return the value that is defined as the failure value in the ancestor

gd047
  • 29,749
  • 18
  • 107
  • 146