ProcessCommandHistory path

Post your questions regarding using the Vault and Fortress API in your programs.

Moderator: SourceGear

Post Reply
cmccown
Posts: 4
Joined: Wed Jun 10, 2009 9:37 am

ProcessCommandHistory path

Post by cmccown » Wed Jun 10, 2009 9:43 am

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.

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: ProcessCommandHistory path

Post by lbauer » Wed Jun 10, 2009 9:46 am

Does it work if you put quotes around the entire path: "$/Branches/2009.08 - EIS" ?
Linda Bauer
SourceGear
Technical Support Manager

cmccown
Posts: 4
Joined: Wed Jun 10, 2009 9:37 am

Re: ProcessCommandHistory path

Post by cmccown » Wed Jun 10, 2009 9:50 am

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 :-)

cmccown
Posts: 4
Joined: Wed Jun 10, 2009 9:37 am

Re: ProcessCommandHistory path

Post by cmccown » Wed Jun 10, 2009 10:33 am

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");

shannon

Re: ProcessCommandHistory path

Post by shannon » Wed Jun 10, 2009 11:23 am

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?

cmccown
Posts: 4
Joined: Wed Jun 10, 2009 9:37 am

Re: ProcessCommandHistory path

Post by cmccown » Wed Jun 10, 2009 12:33 pm

Yes, that worked. I also changed all instances of string.Empty to null. It works now.

Thanks.

shannon

Re: ProcessCommandHistory path

Post by shannon » Wed Jun 10, 2009 12:35 pm

Great, glad it's working now :) Let us know if you have any other questions.

Post Reply