Is RootFolder Id always 1?

Is RootFolder Id always 1?

Anonymous
Not applicable
841 Views
4 Replies
Message 1 of 5

Is RootFolder Id always 1?

Anonymous
Not applicable

As subject: Is the root folder ID hardcoded to 1 so I can save a call to the serviceManger finding it ( ?

0 Likes
Accepted solutions (1)
842 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable

I'm pretty sure the root folder always has Id 1, but why don't you use DocumentService.GetFolderRoot().Id ?

0 Likes
Message 3 of 5

Redmond.D
Autodesk
Autodesk
Accepted solution

The safe thing is to call GetFolderRoot.  I'm not sure if there if the ID is 1 in all cases. It's possible that there is an upgrade path or replication configuration where the ID is not 1.  Also, there is no guarantee that the ID will be the same in future releases.



Doug Redmond
Software Engineer
Autodesk, Inc.

Message 4 of 5

Anonymous
Not applicable

Thanks both!

@bjr001 : Dougs golden rule of performance : Call the serviceManger as little as possible..

0 Likes
Message 5 of 5

Redmond.D
Autodesk
Autodesk

Actually, we are working on a way to minimize the GetFolderRoot calls.  That's all I can say at this time, but I hope to have more details soon.



Doug Redmond
Software Engineer
Autodesk, Inc.

0 Likes