Edit and Save Index Data |
Scroll |
The TheDocument class provides access to its TheIndexData member through the IndexData property. This TheIndexData object contains category-dependent meta-data for the object (e.g. document number, title, category information, version, author, invoice number, due date etc.). This data is stored as a map of {string fieldName, object value} pairs. It is possible to get and set values by their field name and to iterate through field names, values or both. The Step By Step guide and the examples below illustrate how to modify index data values and how to save the changes made. Please see "Read and Process Index Data" to learn how to read, process and iterate TheIndexData.
1 |
Connect to the Thereforeā¢ server (see "Server - Connect and Disconnect" for Details) |
2 |
Declare and initialize a new TheDocument instance. |
3 |
Retrieve the document from the server. |
4 |
Get the document's IndexData. |
5 |
Modify index data values. |
6 |
Save changes to the Thereforeā¢ server. |
Requirements and Assumptions: Document number 42 exists in your Thereforeā¢ system. Index Data contains the money (decimal) fields "AmountNet" and "AmountVAT". If these assumptions do not apply to your system or configuration please replace them with appropriate values when copying the code samples below. |
Using the Default Thereforeā¢ Inbox If the empty string ("") is passed as the second (strInbox) parameter of the Retrieve method, the default Thereforeā¢ inbox will be used for retrieval. |