Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
We used to do something like this to add authorization to a document using the QMS API in QV10
Dim Document As DocumentNode = QMSClient.GetUserDocuments(QvsId).[Single](Function(x) x.RelativePath.Replace("\", "-").ToUpper() + "-" + x.Name.Replace(" ", "_").ToUpper() = sGrupo)
Dim DocMetaData As DocumentMetaData = QMSClient.GetDocumentMetaData(Documento, DocumentMetaDataScope.All)
Dim documentAE As New DocumentAccessEntry()
documentAE.UserName = username
documentAE.DayOfWeekConstraints = New List(Of DayOfWeek)()
DocMetaData.Authorization.Access.Add(documentAE)
QMSClient.SaveDocumentMetaData(DocMetaData)
Same code doesn't work with QV11, there is no Add method for the DocumentAccessEntry class.
Does anyone know how can I achieve the same we were doing in QV10?
I haven't found anything in the documentation or any code samples for the QV11 QMS API, I wonder if there will be any released soon?
Daniel :
You can change Array[] to List[].
Go to the Solution Explorer > (Project) > Services References > (QMS backend) > right click > Service Reference Settings.. > Collection type. Set this to "System.Collections.Generic.List". And rebuild the solution.
You can see Add().
I'll answer my own question.
Since now the QMS API seems to be using Arrays instead of Lists, add method doesn't exist anymore, all you need to do is redim the array, set the appropriate values and save the changes.
Daniel :
You can change Array[] to List[].
Go to the Solution Explorer > (Project) > Services References > (QMS backend) > right click > Service Reference Settings.. > Collection type. Set this to "System.Collections.Generic.List". And rebuild the solution.
You can see Add().
Thanks Hnin, good to know.