SaveCALConfiguration Method
Overloads
SaveCALConfiguration(CALConfiguration) |
Saves the CAL configuration. |
SaveCALConfiguration(CALConfiguration)
Saves the CAL configuration.
Declaration
void SaveCALConfiguration(CALConfiguration calConfiguration)
Parameters
Type | Name | Description |
---|---|---|
CALConfiguration | calConfiguration |
The cal configuration. |
Remarks
Not all fields in the configuration can be changed using this method. For all CAL types (Session, Document, Named and Usage), the Limit can be set. The maximum value is limited by the license on the QVS. The other fields that can be set are related to NamedCALs: NamedCalMode, AllowBorrowCal, AllowDynamicNamedCals and AssignedUsers.
security
Requires membership of local groups QlikView Management API and QlikView Administrator.
Examples
The following code example retrieves the CAL configuration for a QVS, changes a setting and saves it back.
The service key injection is assumed to be handled behind the scenes. For an example of how to inject the service key, see Samples.
using System;
using System.Collections.Generic;
using System.Linq;
using QMSAPI;
class Program
{
static void Main(string[] args)
{
try
{
// create a QMS API client
IQMS apiClient = new QMSClient();
//retrieve a time limited service key
ServiceKeyClientMessageInspector.ServiceKey = apiClient.GetTimeLimitedServiceKey();
//Some known QVS id
Guid qvsId = new Guid("5ac16136-f00b-47c4-8099-23ff7f178423");
CALConfiguration calConfiguration = apiClient.GetCALConfiguration(qvsId, CALConfigurationScope.NamedCALs);
calConfiguration.NamedCALs.AllowDynamicAssignment = false;
apiClient.SaveCALConfiguration(calConfiguration);
}
catch (Exception ex)
{
Console.WriteLine("An exception occurred: " + ex.Message);
}
// wait for user to press any key
Console.ReadLine();
}
}
Did this page help you?
If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!