Hi,
When working with the Vault API I would like to get the prompts that comes with it. For instance when checking out a file (see the code below), I would expect a prompt to be displayed if for instance the local file is newer than than the one in the vault and is about to be overwritten:
File '{0}' is NEWER than the data in the Vault. Are you sure you want to overwrite it?
VDF.Vault.Settings.AcquireFilesSettings settings = new VDF.Vault.Settings.AcquireFilesSettings(connection);
if (!file.IsCheckedOut)
{
settings.DefaultAcquisitionOption = VDF.Vault.Settings.AcquireFilesSettings.AcquisitionOption.Checkout;
settings.OptionsResolution.ForceOverwrite = false;
settings.AddEntityToAcquire(file);
VDF.Vault.Results.AcquireFilesResults results = connection.FileManager.AcquireFiles(settings);
}
Thanks....
Solved! Go to Solution.
Solved by smithmat. Go to Solution.
You'll want to explore using either:
Either of these can be passed to
Notice: the above AcquireFiles method is a different one than you are currently using. The one you are currently using display no UI, while the ones above do display UI.
Using InteractiveAcquireFilesSettings will display the Get/Checkout dialog that you see in Vault.
Using the ProgressAcquireFilesSettings will not display that dialog, but will display other relevant UI (progress dialog, restriction dialogs, error dialogs). I think this is the one you are looking for.