This is fine but even though it doesn't let the user insert a record without attachment. It still occupies the next number sequence on the table. for example in your example SCTASK000 number is taken even though record was rejected