Error when deleting autofill fields

Error when deleting autofill fields

Hello,

I am a beginner and I did a program to fill in fields automatically, but when deleting a record in the front end marks an error. Does anyone know how to put in programming to avoid this error? Thank you so much.