Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
pamaxeed
Partner - Creator III
Partner - Creator III

QMS API - Qlikview 12 SR8

Hi,

i am tryiing to create a Document CALs Releaser service using the .NET SDK.

The code is running fine but the result is not like I expect it :-). No CAL get deleted or put in quarantine!

It is quite urgent 😕

Look the attached Example:

  • DIM CAL is deleted
  • currentCALs for the Document is empty
  • Get Assigned to the Meta.Licensing.AssignedCALs
  • Finally Meta Data gets saved

What is wrong in this implementation?

Code snippet:

for (int i = 0; i < allDocs.Length; i++)

                {

                    //PAM: Get the meta data for the current document

                    Meta = Client.GetDocumentMetaData(allDocs, DocumentMetaDataScope.Licensing);                   //PAM: Extract the current list of Document CALs

                    List<AssignedNamedCAL> currentCALs = Meta.Licensing.AssignedCALs.ToList();

                    bool hasCALs = false;

                    for (int x = 0; x < currentCALs.Count; x++)

                    {

                        hasCALs = true;

                        list.Add(currentCALs.UserName);

                       //PAM: TODO => Logic Handle CAL's that are not used

                        currentCALs.Remove(currentCALs);

                    }

                  if (hasCALs) {

                        //Add the updated CALs list back to the meta data object

                        Meta.Licensing.AssignedCALs = currentCALs.ToArray();

                     //Save the ma back to the server

                        Client.SaveDocumentMetaData(Meta);

                    }

                }

Debug:

Debug1.PNG

QMC after => DIM Cal still available and allocated

QMC_1.PNG

Thanks for your feedback!

1 Solution

Accepted Solutions
pamaxeed
Partner - Creator III
Partner - Creator III
Author

Guys i solved it!

It seems that the API changed with the new version.

RemovedAssignedCALs was added, so the removed CAL's should be assigned here and the the still valid one to AssignedCALs !!!

Meta.Licensing.AssignedCALs = currentCALs.ToArray();

Meta.Licensing.RemovedAssignedCALs = removedCALs.ToArray();

                  

View solution in original post

2 Replies
pamaxeed
Partner - Creator III
Partner - Creator III
Author

Guys i solved it!

It seems that the API changed with the new version.

RemovedAssignedCALs was added, so the removed CAL's should be assigned here and the the still valid one to AssignedCALs !!!

Meta.Licensing.AssignedCALs = currentCALs.ToArray();

Meta.Licensing.RemovedAssignedCALs = removedCALs.ToArray();

                  

stallfelipe
Partner - Contributor II
Partner - Contributor II

Hi patric.

Is it possible to unallocate Named CALs using the API ?

Thanks