Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
danielrozental
Master II
Master II

QV 10 to QV 11 upgrade - QMS API Add Authorization

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?

1 Solution

Accepted Solutions
Not applicable

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().

View solution in original post

3 Replies
danielrozental
Master II
Master II
Author

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.

Not applicable

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().

danielrozental
Master II
Master II
Author

Thanks Hnin, good to know.