Qlik Community

QlikView Integration

Discussion Board for collaboration on QlikView Integration.

Announcements
If you are a Qlik Insight Bot user, join this collaborative group: JOIN GROUP
Honored Contributor 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
Highlighted
Not applicable

Re: QV 10 to QV 11 upgrade - QMS API Add Authorization

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
Highlighted
Honored Contributor II

Re: QV 10 to QV 11 upgrade - QMS API Add Authorization

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.

Highlighted
Not applicable

Re: QV 10 to QV 11 upgrade - QMS API Add Authorization

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

Highlighted
Honored Contributor II

Re: QV 10 to QV 11 upgrade - QMS API Add Authorization

Thanks Hnin, good to know.