ProcessCommandHistory path
Moderator: SourceGear
ProcessCommandHistory path
I'm currently trying to use this method to allow users to select a folder and then run a search in that folder. This is the path I'm using as a test: $/Branches/2009.08 - EIS
If I just search using the path $/Branches, it works. It's the 2009.08 - EIS that isn't working. When I try searching on this folder, I get 1209 : FailInvalidObjID.
Any ideas whats causing this? Is there something I have to do to special character such as a period or dash before I pass it into the method?
Thanks.
If I just search using the path $/Branches, it works. It's the 2009.08 - EIS that isn't working. When I try searching on this folder, I get 1209 : FailInvalidObjID.
Any ideas whats causing this? Is there something I have to do to special character such as a period or dash before I pass it into the method?
Thanks.
Re: ProcessCommandHistory path
Does it work if you put quotes around the entire path: "$/Branches/2009.08 - EIS" ?
Linda Bauer
SourceGear
Technical Support Manager
SourceGear
Technical Support Manager
Re: ProcessCommandHistory path
I'm passing it in as a hard coded string, for testing purposes, so there are quotes around it. I even tried putting quotes in the quotes, as in "\"$/Branches/2009.08 - EIS\"", but it really didn't like that
Re: ProcessCommandHistory path
After further research, the issue seems to be trying to read from any folder more than 3 levels down. No matter the folder name, I get "1209 : FailInvalidObjID".
The method call I'm using is: VaultHistoryItem[] item = ServerOperations.ProcessCommandHistory("$/A-to-Z/_Branches/AlertServerDashboard", true,
DateSortOption.desc, string.Empty,
string.Empty, string.Empty, string.Empty,
string.Empty, string.Empty, 0, 999, 999,
"6432");
The method call I'm using is: VaultHistoryItem[] item = ServerOperations.ProcessCommandHistory("$/A-to-Z/_Branches/AlertServerDashboard", true,
DateSortOption.desc, string.Empty,
string.Empty, string.Empty, string.Empty,
string.Empty, string.Empty, 0, 999, 999,
"6432");
Re: ProcessCommandHistory path
It looks like you're passing beginVersion=0 and endVersion=999? Unless there really is something special about version 999 (and there is a version 999 for whatever folder you're passing), you should probably pass -1 for both to just get all the history. Does that make a difference?
Re: ProcessCommandHistory path
Yes, that worked. I also changed all instances of string.Empty to null. It works now.
Thanks.
Thanks.
Re: ProcessCommandHistory path
Great, glad it's working now Let us know if you have any other questions.