You are viewing limited content. For full access, please sign in.

Question

Question

Setting first Entry ID

asked on July 9, 2019

Hi,

Is there a way to preset the first Entry ID (tocid) a value other than 1, for example set it to 1,000,000 as the Entry ID for the first document in the repository?

Thanks

0 0

Replies

replied on July 9, 2019

There's no supported way to do that.  It's assumed in many places that tocid 1 is the root folder, so you would probably see a lot of things break.  What is the use case for not wanting to start at 1?

1 0
replied on September 17, 2019

Thanks for the reply and apologies for the delayed response.

 

We have a line-of-business system that generates documents and names them an random integer value called ImageID, and locates this value in it's database. When the system recalls the document, an integration exists that uses the Web Access URL parameterised with this ImageID as the EntryID and fires up Web Access and shows the document.

So the integration requires the ImageID to be replaced with EntryID in the systems database virtually instantly after document is produced. A workflow is executed upon import of this document using LF ImportAgent and Workflow which typically is very quick to satisfy this integrations requirements.

 

However, during this replacing of ImageID to EntryID, should the import or the workflow fail, a user could enter the system and view the document which is currently holding ImageID and end up viewing a document from LF of a totally different documents whose EntryID happens to match the ImageID (as we have many more documents in the repository than in the line-of-business system). Admittedly this is very rare - but still can happen.

 

Example:

- Letter created with ImageID 21342.doc

- Repository already has EntryID 21342 which is a totally different document for a different customer

- Whilst import and workflow runs to replace this ImageID with EntryID, a user could potentially view the document through the system based on IamgeID that matches an EntryID of different customer

 

Thus, we want to start the EntryID of our new repository with an EntryID that the other system would never generate as it can only be 9 digits long . Thus we are wanting EntryID to start from 1,000,000,000.

 

Thanks.

 

p.s. we have alternative solution based on security if this is not possible

0 0
replied on September 18, 2019

The way to accomplish this is to reseed the identity on the toc table, which allows you to reset the next auto-increment tocid value. If you do this on a new repository you can avoid having any entries with tocid 3-999,999,999. Try running the following:

dbcc checkident (toc, reseed, 999999999)

Make sure you backup your database first.

Here is the SQL server documentation for the command: https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-checkident-transact-sql?view=sql-server-2017

1 0
replied on September 19, 2019

Thank you for your advice. Much appreciated.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.