This is quite rare requirement as you don’t create custom tables often in Siebel. But if you happen to do that then most probably you will want to make the some of the columns unique which will identify the record as unique.
Requirement:
Make two columns of a table unique . For example I created a table called CX_ERR_MSG and I would like the field ERR_CODE and ERR_LANG to be Unique so that no duplicate records can be created.
Solution:
The most obvious and least recommended solution of course is scripting. On Buscomp PreWrite event you check weather the values entered in the record are already existing or not.
Recommended Solution:
A better and recommended solution for this is to make the fields unique at database level. Here is Step by Step guide on making a coloumn unique at table level.
Let me know your views about the guide. It will help me to decide about my future posts.



(6 votes, average: 3.33 out of 5)






That is fantastic….as a learner it helps me alot. Keep posting some good stuff like this. Thanks!
Unable to download the file. The solution is to add an user key at the table and specify which columsn form a part of that key
unable to download guide.
Plz arrange alternate option for download
…but this only works on tables with no data in this table! Having a table already filled with some data and you want to add a unique field this solution doesnt work – no chance to create the new field as unique due to already existing data!
Solution: use oracle-sequence-field
Hi,
I have created unique index on the db level but the problem is capturing the unique record error message and converting it to user friendly message. I tried try catch block on the pre write record level on bus comp but was not able to catch the error message generated by db unique index…Any idea how we can do this.
Thanks
swatee
We are not able to download the guide. Please upload again