Class BulkUpdateAgent
Facade for the BulkUpdate Agent Agent used for bulk update methods
Inherited Members
Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.dll
Syntax
public class BulkUpdateAgent : AgentBase<IBulkUpdateAgent>, IDisposable, IBulkUpdateAgent, IAgent
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (BulkUpdateAgent agent = new BulkUpdateAgent())
{
// call methods on agent here...
}
}
Constructors
BulkUpdateAgent()
Facade for the BulkUpdate Agent Agent used for bulk update methods
Declaration
public BulkUpdateAgent()
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (BulkUpdateAgent agent = new BulkUpdateAgent())
{
// call methods on agent here...
}
}
Methods
ExecuteByEntityIds(FieldValueInfo[], string, string, string)
Do the batchupdate on selected
Declaration
public int ExecuteByEntityIds(FieldValueInfo[] fieldValueInfos, string tableName, string context, string ids)
Parameters
Type | Name | Description |
---|---|---|
FieldValueInfo[] | fieldValueInfos | The name of the wanted tablename |
string | tableName | The name of the table to bulk update |
string | context | Where is the function called from |
string | ids | Comma separated string of the ids of the entities to update |
Returns
Type | Description |
---|---|
int | Return batchtaskinfoid |
ExecuteBySelectionId(FieldValueInfo[], string, string, int, bool)
Do the batchupdate on this selection
Declaration
public int ExecuteBySelectionId(FieldValueInfo[] fieldValueInfos, string tableName, string context, int selectionId, bool isShadow)
Parameters
Type | Name | Description |
---|---|---|
FieldValueInfo[] | fieldValueInfos | The name of the wanted tablename |
string | tableName | The name of the table to bulk update |
string | context | Where is the function called for |
int | selectionId | The id of the selection |
bool | isShadow | Use the shadow selection |
Returns
Type | Description |
---|---|
int | Return batchtaskinfoid |
GetAvailableFields(string)
Get all available fields for a given tablename/entity
Declaration
public FieldValueInfo[] GetAvailableFields(string tablename)
Parameters
Type | Name | Description |
---|---|---|
string | tablename | The name of the wanted tablename |
Returns
Type | Description |
---|---|
FieldValueInfo[] | Returns array of the available fields for the given entity |
GetJobResultAsJsonFromBinaryObjectId(string, int)
Get result of the batchupdate job
Declaration
public string GetJobResultAsJsonFromBinaryObjectId(string tableName, int binaryObjectId)
Parameters
Type | Name | Description |
---|---|---|
string | tableName | The name of the table that was updated to show the log from |
int | binaryObjectId | Which binaryobject id has stored the job result |
Returns
Type | Description |
---|---|
string | Result of job as json |
GetJobResultsFromStorageAsJson()
Get result of the batchupdate job
Declaration
public string[] GetJobResultsFromStorageAsJson()
Returns
Type | Description |
---|---|
string[] | Result of job as json |
GetStoredFields(string, string)
Get all stored fields for a given tablename/entity and context
Declaration
public FieldValueInfo[] GetStoredFields(string tablename, string context)
Parameters
Type | Name | Description |
---|---|---|
string | tablename | The name of the wanted tablename |
string | context | Where is the function called for |
Returns
Type | Description |
---|---|
FieldValueInfo[] | Returns array of the stored or default fields for the given entity |
RemoveStoredFields(string, string)
Remove the stored settings of the bulk update for this table from this context
Declaration
public bool RemoveStoredFields(string tableName, string context)
Parameters
Type | Name | Description |
---|---|---|
string | tableName | The name of the table to remove stored settings from |
string | context | Where is the function called from that we will remove the settings from |
Returns
Type | Description |
---|---|
bool |
RemoveStoredFieldsAndGetDefaultFields(string, string)
Remove the stored settings of the bulk update for this table from this context, to get the default settings instead
Declaration
public FieldValueInfo[] RemoveStoredFieldsAndGetDefaultFields(string tableName, string context)
Parameters
Type | Name | Description |
---|---|---|
string | tableName | The name of the table to remove stored settings from |
string | context | Where is the function called from that we will remove the settings from |
Returns
Type | Description |
---|---|
FieldValueInfo[] | Returns array of the available fields for the given tablename |