Hello,
I Will make a command that get the next file number of a scheme, I have the following code:
private void bt_Click(object sender, EventArgs e) { login = new UserPasswordCredentials( "****", "****", "****", "****", true // log in as read-only, which doesn't consume a license ); using (WebServiceManager serviceManager = new WebServiceManager(login)) { try { string nombre = serviceManager.DocumentService.GenerateFileNumber(2, null); LB.Text = nombre; } catch (System.Exception ex) { MessageBox.Show(ex.ToString(), "Error"); return; } }
But When I run the program it throws the 303 Exception...Permission Invalid
With this credentials I can acces to Vault Workgroup without problem
I attached a file with the scheme. My scheme contains 2 Predefined List fields and a sequential number. I dont know if my params are the correct for the GenerateFileNumber method, the first is the Scheme ID but the second is the string[] fields, I dont know if I must put the text of a predefined list for example "Z1" or only an index "1"....
I use Vault workgroup, and Visual studio 2010
Thank you very much.
In the SDK documentation, each web service function has a "Required Permissions", which tells you the permission needed to make that call. For GenerateFileNumber, FileChangeFileNumber is the permission. If you go to the global administrator settings, you can see what the permissions are for all the roles. You need to be an Administrator, an File Editor or an Item Editor/Reviewer in order to generate a file number.
Hello,
Yes the user I have is administrator, but I dont really know how to put the params of the generatefilenumber(...), attached is a photo for my scheme, I dont know how to set the string[] params...any help?
The params field is for data that the Vault Server can't figure out on it's own.
For example, your Campo1 field can be 1 of 3 values, but the server doesn't know which one you want. So you have to pass that in as a param. Same for Campo2.
The server controls the Auto-generated values, so you don't need to pass in anything for Campo3.
So your params array may look like this {"Z3", "100"}. The order of the params needs to match the order of the fields in the numbering scheme.