I've a List Job form. In this form there is a button. When user push this button execute this code:
localJob.INIT;
localJob.Template := FALSE;
localJob."Contract Status" := localJob."Contract Status"::"Open";
localJob.INSERT(TRUE);
COMMIT;
CLEAR(VeichleContractCard);
VeichleContractCard.ImpostaFiltro;
VeichleContractCard.SETTABLEVIEW(localJob);
VeichleContractCard.SETRECORD(localJob);
VeichleContractCard.RUNMODAL;
First time that execute code it's work great creating new JOB.
Second time it's shows an error because try to create same Job number.
Why this? I've inserted COMMIT to write transaction. Series increment number correctly but my form don't know this.
How I can solve?
0
Comments