Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Create a Reload Task using QMS API

I am using a QMS API and I want to create a reload task to a document. I do not have Publisher, so It is not a publisher task. What I want is programaticaly add a reload time to a document as we do in QlikView Server when we don't have Publisher installed.

Please find below the function code that should do that. Right now It is just a piece of test to see if I can add a task to a document and save it.

The SaveDocumentTaskFunction returns the following error. It is asking for the Guid of the DistributionService but, as I said, there is no Publisher installed.

The error is Validation of DocumentTask object failed: QDSID property cannot be an empty Guid

The code is:

public void getQVDocument(string sDocument)

        {

            DocumentNode oDoc;

            DocumentTask oTask;

            DocumentTask.TaskReload oReload;

            try

            {

                oDoc = Document(sDocument);

                //Client.GetTasksForDocument(oDoc.ID);

                oTask = new DocumentTask();

                oTask.Scope = DocumentTaskScope.Reload;

                oTask.Document = oDoc;

                oReload = new DocumentTask.TaskReload();

                oReload.Mode = TaskReloadMode.Full;

                oTask.Reload = oReload;

                Client.SaveDocumentTask(oTask);

                int icount = oDoc.TaskCount;

            }

            catch (Exception oEx)

            {

            }

        }

1 Solution

Accepted Solutions
Not applicable
Author

ok, it looks like API does not support that right now. I'd love to have a documentation about QMS API, so we could be more productive instead of just guess what to do next.

Anyway, I am doing this by manually maintaining the QVPR xml files. It is a lot of work but It is the only way I could make this work.

View solution in original post

2 Replies
Not applicable
Author

Anyone?

Not applicable
Author

ok, it looks like API does not support that right now. I'd love to have a documentation about QMS API, so we could be more productive instead of just guess what to do next.

Anyway, I am doing this by manually maintaining the QVPR xml files. It is a lot of work but It is the only way I could make this work.