You need to sign in to do that
Don't have an account?
LSK
Conditional Auto-Number code?
Need to create an auto-number field that only creates an auto-number if a contract is converted to Active - from Draft status.
Does anyone know what code would do this?
Thanks,
LSK
You're welcome. I'm not sure how much more insight I can provide, so here's how I use it.
I ported their code (many thanks to them for their work!) to use on a custom object. Some records need to be filed, some just need to exist for information and tracking and are never filed. For the ones that are filed, the user has to push a button to assign the file number. The code checks the "file number" object and then increments and updates the field after a confirmation alert. This was probably not the cleanest way, and it doesn't make use of all the API features, but I too am not versed enough to code this in Apex. It works fine for us since the group that uses it wants full control over when and if a number is assigned.
I'm thinking you could probably change the S-Control behavior to evaluate the Contract Status when the page saves instead of a button?