Interface IBulkUpdateAgent
Interface for the BulkUpdate Agent Agent used for bulk update methods
Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.dll
Syntax
[Agent("BulkUpdate Agent", "Interface for the BulkUpdate Agent. Agent used for bulk update methods")]
public interface 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...
}
}
Methods
ExecuteByEntityIds(FieldValueInfo[], String, String, String)
Do the batchupdate on selected
Declaration
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 |
---|---|
Int32 | Return batchtaskinfoid |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (BulkUpdateAgent agent = new BulkUpdateAgent())
{
// call methods on agent here...
}
}
ExecuteBySelectionId(FieldValueInfo[], String, String, Int32, Boolean)
Do the batchupdate on this selection
Declaration
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 |
Int32 | selectionId | The id of the selection |
Boolean | isShadow | Use the shadow selection |
Returns
Type | Description |
---|---|
Int32 | Return batchtaskinfoid |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (BulkUpdateAgent agent = new BulkUpdateAgent())
{
// call methods on agent here...
}
}
GetAvailableFields(String)
Get all available fields for a given tablename/entity
Declaration
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 |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (BulkUpdateAgent agent = new BulkUpdateAgent())
{
// call methods on agent here...
}
}
GetJobResultAsJsonFromBinaryObjectId(String, Int32)
Get result of the batchupdate job
Declaration
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 |
Int32 | binaryObjectId | Which binaryobject id has stored the job result |
Returns
Type | Description |
---|---|
String | Result of job as json |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (BulkUpdateAgent agent = new BulkUpdateAgent())
{
// call methods on agent here...
}
}
GetJobResultsFromStorageAsJson()
Get result of the batchupdate job
Declaration
string[] GetJobResultsFromStorageAsJson()
Returns
Type | Description |
---|---|
String[] | Result of job as json |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (BulkUpdateAgent agent = new BulkUpdateAgent())
{
// call methods on agent here...
}
}
GetStoredFields(String, String)
Get all stored fields for a given tablename/entity and context
Declaration
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 |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (BulkUpdateAgent agent = new BulkUpdateAgent())
{
// call methods on agent here...
}
}
RemoveStoredFields(String, String)
Remove the stored settings of the bulk update for this table from this context
Declaration
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 |
---|---|
Boolean |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (BulkUpdateAgent agent = new BulkUpdateAgent())
{
// call methods on agent here...
}
}
RemoveStoredFieldsAndGetDefaultFields(String, String)
Remove the stored settings of the bulk update for this table from this context, to get the default settings instead
Declaration
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 |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (BulkUpdateAgent agent = new BulkUpdateAgent())
{
// call methods on agent here...
}
}