Class UserDefinedFieldInfoAgent
Proxy class for the UserDefinedFieldInfo Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Inherited Members
Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.Implementation.dll
Syntax
public class UserDefinedFieldInfoAgent : IUserDefinedFieldInfoAgent, IAgent
Constructors
UserDefinedFieldInfoAgent(IFieldInfoBaseImplementation, IUserDefinedFieldInfoImplementation, ISoRequestItemsAccessor)
Proxy class for the UserDefinedFieldInfo Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Declaration
public UserDefinedFieldInfoAgent(IFieldInfoBaseImplementation fieldInfoBaseImplementation, IUserDefinedFieldInfoImplementation userDefinedFieldInfoImplementation, ISoRequestItemsAccessor accessor)
Parameters
Type | Name | Description |
---|---|---|
IFieldInfoBaseImplementation | fieldInfoBaseImplementation | |
IUserDefinedFieldInfoImplementation | userDefinedFieldInfoImplementation | |
ISoRequestItemsAccessor | accessor |
UserDefinedFieldInfoAgent(IFieldInfoBaseImplementation, IUserDefinedFieldInfoImplementation, ISoRequestItemsAccessor, IDebugUser, IServiceCallsRepository)
Proxy class for the UserDefinedFieldInfo Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Declaration
public UserDefinedFieldInfoAgent(IFieldInfoBaseImplementation fieldInfoBaseImplementation, IUserDefinedFieldInfoImplementation userDefinedFieldInfoImplementation, ISoRequestItemsAccessor accessor, IDebugUser debugUser, IServiceCallsRepository serviceCallsRepository)
Parameters
Type | Name | Description |
---|---|---|
IFieldInfoBaseImplementation | fieldInfoBaseImplementation | |
IUserDefinedFieldInfoImplementation | userDefinedFieldInfoImplementation | |
ISoRequestItemsAccessor | accessor | |
IDebugUser | debugUser | |
IServiceCallsRepository | serviceCallsRepository |
Methods
ChangeFieldTypeAsync(UserDefinedFieldInfo, UDefFieldType, bool, CancellationToken)
Create a UserDefinedFieldInfo based on a owner-entity id
Declaration
public Task<UserDefinedFieldInfo> ChangeFieldTypeAsync(UserDefinedFieldInfo info, UDefFieldType fieldType, bool isIndexed, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
UserDefinedFieldInfo | info | The user-defined field info carrier to want to modify |
UDefFieldType | fieldType | The new field type you want |
bool | isIndexed | The new indexed status you want |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<UserDefinedFieldInfo> | Returns the user-defined field info carrier |
ClearCachesAsync(CancellationToken)
Clear all relevant caches. This is normally done automatically but can be useful in certain circumstances.
Declaration
public Task ClearCachesAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task |
CreateDefaultUserDefinedFieldInfoAsync(CancellationToken)
Loading default values into a new UserDefinedFieldInfo. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance
Declaration
public Task<UserDefinedFieldInfo> CreateDefaultUserDefinedFieldInfoAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<UserDefinedFieldInfo> | New UserDefinedFieldInfo with default values |
CreateUserDefinedFieldInfoAsync(UDefType, UDefFieldType, CancellationToken)
Create a UserDefinedFieldInfo based on a owner-entity id
Declaration
public Task<UserDefinedFieldInfo> CreateUserDefinedFieldInfoAsync(UDefType ownerType, UDefFieldType fieldType, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
UDefType | ownerType | The user-defined field owner-entity id. |
UDefFieldType | fieldType | The field type of the new field |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<UserDefinedFieldInfo> | Returns the user-defined field info carrier |
DeleteUserDefinedFieldInfoAsync(int, CancellationToken)
Deletes the UserDefinedFieldInfo
Declaration
public Task DeleteUserDefinedFieldInfoAsync(int userDefinedFieldInfoId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int | userDefinedFieldInfoId | The identity of the UserDefinedFieldInfo |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task |
DetectColumnIdChangesAsync(UDefType, CancellationToken)
Detect columnid changes to the admin version (for determining publish warning)
Declaration
public Task<bool> DetectColumnIdChangesAsync(UDefType ownerType, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
UDefType | ownerType | The owner type |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<bool> | Returns true if columnid changes where found. i.e. if data needs to be moved during publishing. |
DetectUnpublishedChangesAsync(UDefType, CancellationToken)
Detect changes to the admin version (unpublished)
Declaration
public Task<bool> DetectUnpublishedChangesAsync(UDefType ownerType, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
UDefType | ownerType | The owner type |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<bool> | Returns true if any changes were found. This includes cosmetic changes. |
FigureOutListIdFromListTableIdAndUDListDefinitionIdAsync(UserDefinedFieldInfo, CancellationToken)
Kind of the reverse of SetListTableIdAndUDListDefinitionIdFromSelectedListId
Declaration
public Task<int> FigureOutListIdFromListTableIdAndUDListDefinitionIdAsync(UserDefinedFieldInfo info, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
UserDefinedFieldInfo | info | |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<int> |
GetChangedPageOneFieldsAsync(UDefType, int, CancellationToken)
Gets which page one fields have changed from the current version
Declaration
public Task<bool[]> GetChangedPageOneFieldsAsync(UDefType ownerType, int userGroupId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
UDefType | ownerType | The user-defined field owner-entity. |
int | userGroupId | Id of UserGroup |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<bool[]> |
GetCustomFieldInfoAsync(string, string, CancellationToken)
Return information about a particular custom field (user-defined + extra) on a particular table
Declaration
public Task<FieldInfoBase> GetCustomFieldInfoAsync(string tableName, string fieldName, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | tableName | The name of table that owns the custom fields. e.g. 'contact', 'person', 'project' etc. |
string | fieldName | The name of the field: prog:id or field name. e.g. 'SuperOffice:21' or 'x_foobar' |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<FieldInfoBase> | user-defined or extra field info. Describes default values, mandatory, visiblity, labels and choices. |
GetCustomFieldInfoListAsync(string, bool, CancellationToken)
Return information about all the custom fields (user-defined + extra) on a particular table
Declaration
public Task<FieldInfoBase[]> GetCustomFieldInfoListAsync(string tableName, bool includeStandard, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | tableName | The name of table that owns the custom fields. e.g. 'contact', 'person', 'project' etc. |
bool | includeStandard | Include standard fields in result. Default false. |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<FieldInfoBase[]> | Array of user-defined and extra field info in rank order. Describes default values, mandatory, visiblity, labels and choices. |
GetPublishedUserDefinedFieldFromFieldLabelAsync(string, UDefType, CancellationToken)
Return information about the given user defined field identified by the owner and the field label. Note that field labels are fuzzy. Leading and trailing spaces and punctuation are ignored.
Declaration
public Task<UserDefinedFieldInfo> GetPublishedUserDefinedFieldFromFieldLabelAsync(string fieldLabel, UDefType ownerType, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | fieldLabel | The field label - the text label shown in the user interface. Trailing spaces and punctuation (":" and ".") are ignored when searching. |
UDefType | ownerType | The user-defined field owner-entity id. |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<UserDefinedFieldInfo> | Returns the user-defined field info carrier, or null if no matching field is found. |
GetPublishedUserDefinedFieldFromProgIdAsync(string, UDefType, CancellationToken)
Return information about the given user defined field identified by the owner and the prog-id. The prog-id is used as the key in the entity carriers.
Declaration
public Task<UserDefinedFieldInfo> GetPublishedUserDefinedFieldFromProgIdAsync(string progId, UDefType ownerType, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | progId | The prog.id is a hidden name that uniquely identifies the field. |
UDefType | ownerType | The user-defined field owner-entity id. |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<UserDefinedFieldInfo> | Returns the user-defined field info carrier, or null if no matching field is found. |
GetPublishedUserDefinedFieldListAsync(UDefType, CancellationToken)
Return information about all the user defined fields on a particular owner type (project, contact, person, etc).
Declaration
public Task<UserDefinedFieldInfo[]> GetPublishedUserDefinedFieldListAsync(UDefType ownerType, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
UDefType | ownerType | The user-defined field owner-entity id. |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<UserDefinedFieldInfo[]> | Returns an array of user-defined field info carriers. |
GetPublishedUserDefinedPageOneFieldsAsync(UDefType, int, CancellationToken)
Get a list of page one fields for given Udef type and current user group
Declaration
public Task<UserDefinedFieldInfo[]> GetPublishedUserDefinedPageOneFieldsAsync(UDefType ownerType, int userGroupId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
UDefType | ownerType | The user-defined field owner-entity. |
int | userGroupId | Id of UserGroup |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<UserDefinedFieldInfo[]> | Returns an array of page one user-defined field info carriers. |
GetUserDefinedFieldFromFieldLabelAsync(string, UDefType, CancellationToken)
Return information about the given user defined field identified by the owner and the field label. Note that field labels are fuzzy. Leading and trailing spaces and punctuation are ignored. Note this may be different than the currently published fields.
Declaration
public Task<UserDefinedFieldInfo> GetUserDefinedFieldFromFieldLabelAsync(string fieldLabel, UDefType ownerType, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | fieldLabel | The field label - the text label shown in the user interface. Trailing spaces and punctuation (":" and ".") are ignored when searching. |
UDefType | ownerType | The user-defined field owner-entity id. |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<UserDefinedFieldInfo> | Returns the user-defined field info carrier, or null if no matching field is found. |
GetUserDefinedFieldFromIdsAsync(int[], CancellationToken)
Return an given array of user defined field identified by the ids.
Declaration
public Task<UserDefinedFieldInfo[]> GetUserDefinedFieldFromIdsAsync(int[] ids, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int[] | ids | Array of user defined field ids |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<UserDefinedFieldInfo[]> | Returns an array of user-defined field info carriers |
GetUserDefinedFieldFromProgIdAsync(string, UDefType, CancellationToken)
Return information about the given user defined field identified by the owner and the prog-id. The prog-id is used as the key in the entity carriers. Note this may be different than the currently published fields.
Declaration
public Task<UserDefinedFieldInfo> GetUserDefinedFieldFromProgIdAsync(string progId, UDefType ownerType, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | progId | The prog.id is a hidden name that uniquely identifies the field. |
UDefType | ownerType | The user-defined field owner-entity id. |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<UserDefinedFieldInfo> | Returns the user-defined field info carrier, or null if no matching field is found. |
GetUserDefinedFieldFromProgIdsAsync(string[], UDefType, CancellationToken)
Return an given array user defined field identified by the owner and the prog-ids. The prog-id is used as the key in the entity carriers. Note this may be different than the currently published field layout.
Declaration
public Task<UserDefinedFieldInfo[]> GetUserDefinedFieldFromProgIdsAsync(string[] progIds, UDefType ownerType, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string[] | progIds | The prog.id is a hidden name that uniquely identifies the field. |
UDefType | ownerType | The user-defined field owner-entity id. |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<UserDefinedFieldInfo[]> | Returns an array of user-defined field info carriers |
GetUserDefinedFieldInfoAsync(int, CancellationToken)
Gets a UserDefinedFieldInfo object.
Declaration
public Task<UserDefinedFieldInfo> GetUserDefinedFieldInfoAsync(int userDefinedFieldInfoId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int | userDefinedFieldInfoId | The identifier of the UserDefinedFieldInfo object |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<UserDefinedFieldInfo> | UserDefinedFieldInfo |
GetUserDefinedFieldListAsync(UDefType, CancellationToken)
Return information about all the user defined fields on a particular owner type (project, contact, person, etc). Note this may be different than the currently published fields.
Declaration
public Task<UserDefinedFieldInfo[]> GetUserDefinedFieldListAsync(UDefType ownerType, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
UDefType | ownerType | The user-defined field owner-entity id. |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<UserDefinedFieldInfo[]> | Returns an array of user-defined field info carriers. |
GetUserDefinedPageOneFieldsAsync(UDefType, int, CancellationToken)
Get a list of page one fields for given Udef type and current user group
Declaration
public Task<UserDefinedFieldInfo[]> GetUserDefinedPageOneFieldsAsync(UDefType ownerType, int userGroupId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
UDefType | ownerType | The user-defined field owner-entity. |
int | userGroupId | Id of UserGroup |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<UserDefinedFieldInfo[]> | Returns an array of page one user-defined field info carriers. |
IsAnyPublishEventActiveAsync(CancellationToken)
Check if any publish events are active
Declaration
public Task<bool> IsAnyPublishEventActiveAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<bool> |
IsPublishEventActiveAsync(UDefType, CancellationToken)
Check if the publish event is active for the given type
Declaration
public Task<bool> IsPublishEventActiveAsync(UDefType type, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
UDefType | type | |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<bool> |
PublishAsync(UDefType, CancellationToken)
Publish changed Udef fields for the given owner type
Declaration
public Task<int> PublishAsync(UDefType ownerType, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
UDefType | ownerType | The owner type to publish for |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<int> | Batch task id or 0 that handles publishing. |
RevertAsync(UDefType, CancellationToken)
Revert changed Udef fields for the given owner type - all unpublished changes will be lost
Declaration
public Task RevertAsync(UDefType ownerType, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
UDefType | ownerType | The owner type to revert fields for |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task |
SaveUserDefinedFieldInfoAsync(UserDefinedFieldInfo, CancellationToken)
Updates the existing UserDefinedFieldInfo or creates a new UserDefinedFieldInfo if the id parameter is empty
Declaration
public Task<UserDefinedFieldInfo> SaveUserDefinedFieldInfoAsync(UserDefinedFieldInfo userDefinedFieldInfo, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
UserDefinedFieldInfo | userDefinedFieldInfo | The UserDefinedFieldInfo that is saved. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<UserDefinedFieldInfo> | New or updated UserDefinedFieldInfo |
SaveUserDefinedFieldInfosAsync(UserDefinedFieldInfo[], CancellationToken)
Save an array of user defined fields. This will update the unpublished layout.
Declaration
public Task SaveUserDefinedFieldInfosAsync(UserDefinedFieldInfo[] infos, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
UserDefinedFieldInfo[] | infos | An array of user defined fields |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task |
SetListTableIdAndUDListDefinitionIdFromSelectedListIdAsync(UserDefinedFieldInfo, int, CancellationToken)
Make stuff similar to what happens in the win client
Declaration
public Task<UserDefinedFieldInfo> SetListTableIdAndUDListDefinitionIdFromSelectedListIdAsync(UserDefinedFieldInfo info, int selectedListId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
UserDefinedFieldInfo | info | |
int | selectedListId | |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task<UserDefinedFieldInfo> |
SetPageOneFieldGroupingAsync(UDefType, bool, CancellationToken)
Sets the Page One Field grouping for a specific entity
Declaration
public Task SetPageOneFieldGroupingAsync(UDefType ownerType, bool active, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
UDefType | ownerType | The user-defined field owner-entity. |
bool | active | If true, use grouping |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task |
SetPublishStartSystemEventAsync(UDefType, CancellationToken)
Set the start flag for udef publishing. Must be called before PUBLISH, or PUBLISH will fail. Start flag is removed when publish process completes.
Declaration
public Task SetPublishStartSystemEventAsync(UDefType ownerType, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
UDefType | ownerType | The user-defined field owner-entity. |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task |
SetRankOnFieldsAsync(UDefType, int[], CancellationToken)
Change rank of user defined fields
Declaration
public Task SetRankOnFieldsAsync(UDefType ownerType, int[] rankedFieldsIds, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
UDefType | ownerType | The user-defined field owner-entity. |
int[] | rankedFieldsIds | All IDs of this owner-entity in desired rank order |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task |
SetUserDefinedPageOneFieldAsync(UDefType, int, int, int, CancellationToken)
Sets a user defined fields as page one field.
Declaration
public Task SetUserDefinedPageOneFieldAsync(UDefType ownerType, int udefFieldId, int userGroupId, int fieldLineNo, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
UDefType | ownerType | The user-defined field owner entity |
int | udefFieldId | The id of the udeffield to set as page one field |
int | userGroupId | The usergroup id to associate the page one field with. |
int | fieldLineNo | Page one line number |
CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
Type | Description |
---|---|
Task |