Update Index FieldsDocuWare Platform .NET API

In order to update the values of the index fields of a document you only need to modify the changed fields. As a result of the update you get all fields returned.

Update some fields of a document

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DocuWare.Platform.ServerClient;

namespace DocuWare.PlatformClientExamples
{
    static partial class Examples
    {
        public static DocumentIndexFields Update(Document document)
        {
            var fields = new DocumentIndexFields()
            {
                Field = new List<DocumentIndexField>() 
                { 
                    DocumentIndexField.Create("RECIPIENT", "Me"),
                    DocumentIndexField.Create("COMPANY", "Café Alt Wien"),
                }
            };

            var result = document.PutToFieldsRelationForDocumentIndexFields(fields);
            return result;
        }

    }
}
Update some fields of a document asynchronously

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DocuWare.Platform.ServerClient;

namespace DocuWare.PlatformClientExamples
{
    static partial class ExamplesAsync
    {
        public static async Task<DocumentIndexFields> UpdateAsync(Document document)
        {
            var fields = new DocumentIndexFields()
            {
                Field = new List<DocumentIndexField>() 
                { 
                    DocumentIndexField.Create("RECIPIENT", "Me"),
                    DocumentIndexField.Create("COMPANY", "Café Alt Wien"),
                }
            };

            DocumentIndexFields result = await document.PutToFieldsRelationForDocumentIndexFieldsAsync(fields);
            return result;
        }
    }
}