Show / Hide Table of Contents

Interface INumberAllocationAgent

Interface for the NumberAllocation Agent This agent can be used to manage number allocation

Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.dll
Syntax
[Agent("NumberAllocation Agent", "Interface for the NumberAllocation Agent. This agent can be used to manage number allocation")]
public interface INumberAllocationAgent : IAgent
Examples
using SuperOffice;
using SuperOffice.CRM.Services;

using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
   using (NumberAllocationAgent agent = new NumberAllocationAgent())
   {
      // call methods on agent here...
   }
}

Methods

CreateDefaultRefCountEntityAsync(CancellationToken)

Loading default values into a new RefCountEntity. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance

Declaration
Task<RefCountEntity> CreateDefaultRefCountEntityAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task<RefCountEntity>

New RefCountEntity with default values

DeleteRefCountEntityAsync(int, CancellationToken)

Deletes the RefCountEntity

Declaration
Task DeleteRefCountEntityAsync(int refCountEntityId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int refCountEntityId

The identity of the RefCountEntity

CancellationToken cancellationToken
Returns
Type Description
Task

GetNumberEachTemplateAsync(CancellationToken)

Returns true or false if Automatically create new counters for new document templates

Declaration
Task<bool> GetNumberEachTemplateAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task<bool>

Is NumberEachTemplate?

GetRefCountEntityAsync(int, CancellationToken)

Gets a RefCountEntity object.

Declaration
Task<RefCountEntity> GetRefCountEntityAsync(int refCountEntityId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int refCountEntityId

The identifier of the RefCountEntity object

CancellationToken cancellationToken
Returns
Type Description
Task<RefCountEntity>

RefCountEntity

SaveDefaultNumberingAsync(RefCountEntity, CancellationToken)

Saves default numbering values in preferences

Declaration
Task SaveDefaultNumberingAsync(RefCountEntity refCountEntity, CancellationToken cancellationToken = default)
Parameters
Type Name Description
RefCountEntity refCountEntity

The refCountEntity that holds the values that will be saved

CancellationToken cancellationToken
Returns
Type Description
Task

void

SaveRefCountEntityAsync(RefCountEntity, CancellationToken)

Updates the existing RefCountEntity or creates a new RefCountEntity if the id parameter is empty

Declaration
Task<RefCountEntity> SaveRefCountEntityAsync(RefCountEntity refCountEntity, CancellationToken cancellationToken = default)
Parameters
Type Name Description
RefCountEntity refCountEntity

The RefCountEntity that is saved.

CancellationToken cancellationToken
Returns
Type Description
Task<RefCountEntity>

New or updated RefCountEntity

SetNumberEachTemplateAsync(bool, CancellationToken)

Saves true or false if Automatically create new counters for new document templates

Declaration
Task SetNumberEachTemplateAsync(bool setValue, CancellationToken cancellationToken = default)
Parameters
Type Name Description
bool setValue

true or false if Automatically create new counters for new document templates

CancellationToken cancellationToken
Returns
Type Description
Task

void

© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top