AnsweredAssumed Answered

Auto-generated serials

Question asked by Frinholp on Jun 11, 2010
Latest reply on Jun 11, 2010 by Frinholp


Auto-generated serials


OK I have requested help previously regarding this problem and I marked the post as solved so I thought it is best to start a new thread. Here is the old post:


I currently have my RecordID field created by calculation which is based on an auto-generated serial number. For consistency I would prefer to have all ID fileds sequential. Previously I had my ID's auto-entered on creation. The problem was that if I decided not to commit a record, a serial had  been generated leaving inconsistency in my calculated ID's. To get around this problem instead of having the serial generated on creation, I changed it to be generated on commit. This presented a new problem. I have a situation where a record creates a record in a related table through a portal. I need an ID to use as a foreign key for the record created through the portal. If my ID's are created on commit, there is no ID to pass to the record in the portal.


Has anyone any ideas how I can get around this problem? It would be nice if I could generate the ID's on creation and if say a cancel button is pressed, I  write a script that reverts the record and decrements the serial generator value by one. Is this possible?


I hope my problem is clear, if not please ask for more info.


Thanks in advance