Skip to main content

<a id=“SuperOffice_WebApi_Agents_BulkUpdateAgent”></a> Class BulkUpdateAgent

Namespace: SuperOffice.WebApi.Agents
Assembly: SuperOffice.WebApi.dll
Agent used for bulk update methods

Inheritance

objectAgentBaseBulkUpdateAgent

Implements

IBulkUpdateAgent, IAgentBase, IDisposable

Inherited Members

AgentBase._json, AgentBase._binary, AgentBase._config, AgentBase._client, AgentBase._disposeClient, AgentBase.Merge(RequestOptions), AgentBase.BuildRequestFromObject(HttpMethod, string, object, WebApiOptions, string), AgentBase.BuildRequestFromStream(HttpMethod, string, Stream, WebApiOptions, string), AgentBase.BuildRequestFromObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string), AgentBase.ParseAuthorization(IAuthorization), AgentBase.CancelRequest(), AgentBase.SendRequestObject(HttpMethod, string, object, WebApiOptions, string), AgentBase.SendRequestObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string), AgentBase.SendRequest(HttpRequestMessage, RequestOptions), AgentBase.ThrowOnResponseErrorAsync(HttpRequestMessage, HttpResponseMessage), AgentBase.ParseResponse<T&gt;(HttpResponseMessage), AgentBase.Finally(RequestOptions), AgentBase.Dispose(), AgentBase.Configuration, AgentBase.Client, AgentBase.HasRunningRequest, AgentBase.ClientCancellationTokenSource, AgentBase.ProgressListener, AgentBase.UploadProgressListener, object.ToString(), object.Equals(object), object.Equals(object, object), object.ReferenceEquals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone()

Examples

<pre><code class=“lang-csharp”>using SuperOffice.WebApi; using SuperOffice.WebApi.Agents; var mySession = new WebApiOptions(“http://example.com/super/api”); mySession.Authorization = new AuthorizationUsernamePassword(“user”, “pass”); using (BulkUpdateAgent agent = new BulkUpdateAgent(mySession)) { // call methods on agent here… }</code></pre>

Constructors

<a id=“SuperOffice_WebApi_Agents_BulkUpdateAgent__ctor_System_Net_Http_HttpClient_”></a> BulkUpdateAgent(HttpClient)

Constructor: Agent used for bulk update methods

Parameters

httpClient HttpClient Use this HTTP client instead of making own HttpClient instance.

<a id=“SuperOffice_WebApi_Agents_BulkUpdateAgent__ctor_SuperOffice_WebApi_WebApiOptions_System_Net_Http_HttpClient_”></a> BulkUpdateAgent(WebApiOptions, HttpClient)

Constructor: Agent used for bulk update methods

Parameters

options WebApiOptions Base URL and authentication values. httpClient HttpClient Optional: Use this HTTP client instead of making a new one.

Methods

<a id=“SuperOffice_WebApi_Agents_BulkUpdateAgent_ExecuteByEntityIdsAsync_SuperOffice_WebApi_Data_FieldValueInfo___System_String_System_String_System_String_SuperOffice_WebApi_RequestOptions_”></a> ExecuteByEntityIdsAsync(FieldValueInfo[], string, string, string, RequestOptions)

Do the batchupdate on selected

Parameters

fieldValueInfos FieldValueInfo[] The name of the wanted tablename tableName string The name of the table to bulk update context string Where is the function called from ids string Comma separated string of the ids of the entities to update requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<int&gt; Return batchtaskinfoid

<a id=“SuperOffice_WebApi_Agents_BulkUpdateAgent_ExecuteBySelectionIdAsync_SuperOffice_WebApi_Data_FieldValueInfo___System_String_System_String_System_Int32_System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> ExecuteBySelectionIdAsync(FieldValueInfo[], string, string, int, bool, RequestOptions)

Do the batchupdate on this selection

Parameters

fieldValueInfos FieldValueInfo[] The name of the wanted tablename tableName string The name of the table to bulk update context string Where is the function called for selectionId int The id of the selection isShadow bool Use the shadow selection requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<int&gt; Return batchtaskinfoid

<a id=“SuperOffice_WebApi_Agents_BulkUpdateAgent_GetAvailableFieldsAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetAvailableFieldsAsync(string, RequestOptions)

Get all available fields for a given tablename/entity

Parameters

tablename string The name of the wanted tablename requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<FieldValueInfo[]&gt; Returns array of the available fields for the given entity

<a id=“SuperOffice_WebApi_Agents_BulkUpdateAgent_GetJobResultAsJsonFromBinaryObjectIdAsync_System_String_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetJobResultAsJsonFromBinaryObjectIdAsync(string, int, RequestOptions)

Get result of the batchupdate job

Parameters

tableName string The name of the table that was updated to show the log from binaryObjectId int Which binaryobject id has stored the job result requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<string&gt; Result of job as json

<a id=“SuperOffice_WebApi_Agents_BulkUpdateAgent_GetJobResultsFromStorageAsJsonAsync_SuperOffice_WebApi_RequestOptions_”></a> GetJobResultsFromStorageAsJsonAsync(RequestOptions)

Get result of the batchupdate job

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<string[]&gt; Result of job as json

<a id=“SuperOffice_WebApi_Agents_BulkUpdateAgent_GetStoredFieldsAsync_System_String_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetStoredFieldsAsync(string, string, RequestOptions)

Get all stored fields for a given tablename/entity and context

Parameters

tablename string The name of the wanted tablename context string Where is the function called for requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<FieldValueInfo[]&gt; Returns array of the stored or default fields for the given entity

<a id=“SuperOffice_WebApi_Agents_BulkUpdateAgent_RemoveStoredFieldsAndGetDefaultFieldsAsync_System_String_System_String_SuperOffice_WebApi_RequestOptions_”></a> RemoveStoredFieldsAndGetDefaultFieldsAsync(string, string, RequestOptions)

Remove the stored settings of the bulk update for this table from this context, to get the default settings instead

Parameters

tableName string The name of the table to remove stored settings from context string Where is the function called from that we will remove the settings from requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<FieldValueInfo[]&gt; Returns array of the available fields for the given tablename

<a id=“SuperOffice_WebApi_Agents_BulkUpdateAgent_RemoveStoredFieldsAsync_System_String_System_String_SuperOffice_WebApi_RequestOptions_”></a> RemoveStoredFieldsAsync(string, string, RequestOptions)

Remove the stored settings of the bulk update for this table from this context

Parameters

tableName string The name of the table to remove stored settings from context string Where is the function called from that we will remove the settings from requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<bool&gt;