
I can’t believe I forgot to add this to the “What’s New” page in the SDK documentation. New in the Vault 2013 API, you have the ability to jump to a different location when you custom command completes. This is a useful feature if, for example, your command creates a folder and you want the user to navigate there.
To enable this feature, you just need to set GoToLocation property on the ICommandContext object that gets passed into your custom command. It works similar to ForceRefresh. You set the value somewhere in your custom command, and Vault Explorer performs additional actions when your command completes. And yes, you can use GoToLocation and ForceRefresh together. The refresh happens first, then the location jump happens next.
To set GoToLocation, you need to set up a new LocationContext object. That object has 2 parts to it. One part is the SelectionTypeId, which is basically the type of object we are navigating to. The other part is the FullName, or path, to the object. Because we are dealing with navigation tree locations, the currency is names and paths instead of IDs.
What you put for FullName is dependent on the object type. Here is a table that explains the values.
| Entity Class | LocationContext.FullName |
| File | Full Vault path to file |
| Folder | Full Vault path to the folder |
| Item | The Item number |
| Change Order | The Change Order number |
| Custom Entity | The Custom Entity number |


Subscribe