I think you must have encountered this requirement very often… But the Solution always seems to be tricky… We recently had a requirement to have a unique Id for a contact.
“Yeah”, the best solution would be to use the Row Id. But the challenge with us was Business required it to be a number.
Siebel “Sequence” BC and User Properties.
1)Name=Sequence Field,Value=Fieldname(ex=line item).
2)Name=Sequence Use Max,Value=Y.
Note=On applet propeties Set Insert Position=LAST.
This was not working for us because of a inherent Siebel Product Bug. (The Auto increment was not happening in server Bug # 10505489)
Using Scripting.Logic is to store the latest value in a LOV and keep updating that LOV value using Scripting. The challenge with this was if 2 people creating at a same time, have a remote chances that the same number is assigned.
Converting Row_Id from Alphanumeric to number.( Base 30 to Base 10)
BC : Contact, new Calculated Field :Name = ConRowNumCalc, Value = RowIdToRowIdNum ([Id]), this will convert the Row_Id to a number. We need to remove the “-” which will be present in the RowID and we had additional requirement to append some characters (Eg : ABC), that was accomplised by a code in WriteRecord() event.
var sCnum = this.GetFieldValue(“ConRowNumCalc”);
sCnum = sCnum.replace(“-“,””);
sCnum = “ABC-” + sCnum;
This worked perfectly without any duplications or performance issues. only the only challenge with this is the numbers will not be in a order. But that was fine for us, as long as it was unique.. 🙂