We have been using alfresco for quiet some time and have always used the doc ids that get generated but for now, I want to set the document id by myself while uploading the document.
Background Story: We are working on migrating content from a different document management system to Alfresco. So I want to maintain the same doc id even in alfresco.
Is this possible ? If so, please tell me how can this be achieved ?
So first of all I'm assuming you're talking about the Alfresco NodeReference? So you don't change this as it's a fundamental part of Alfresco and is not modifiable. However, you can define a custom property that you can use to store and show the value. You can then use this value as a basis for search/retrieval etc. Have a look here for how can create and display custom properties - http://ecmarchitect.com/alfresco-developer-series-tutorials/content/tutorial/tutorial.html. Also, if using Alfresco 5.1 you can now do this a lot more easily using the Content Model Management functionality (http://docs.alfresco.com/5.1/concepts/admintools-cmm-intro.html)
Alfresco out of the box doesn't give you the ability to set properties as part of uploading (you can do it afterwards), but there are extensions like https://addons.alfresco.com/addons/uploader-plus and others that allow you to change the way this works
Actually you can set the node ref when creating a new node in alfresco. I used it for the transfer service which does keep node refs the same. IIRC its a special named property on the node service create call.
There are limits to what is a valid node ref and it must be unique.