Table of Contents

Crm.Distribution.SalesPersonTargetLines Entity

Namespace: Crm.Distribution

Detail records (lines) of targets for sales persons. Entity: Crm_Sales_Person_Target_Lines

Default Visualization

Default Display Text Format:
{PeriodYear}-{PeriodMonth} {TargetType}
Default Search Members:
SalesPersonTarget.DocumentNo
Name Data Member:
SalesPersonTarget.EntityName
Category: Definitions
Show in UI: ShownByDefault

Track Changes

Min level: 0 - Do not track changes
Max level: 4 - Track object attribute and blob changes

Aggregate

An aggregate is a cluster of domain objects that can be treated as a single unit.

Aggregate Parent:
Crm.Distribution.SalesPersonTargets
Aggregate Root:
Crm.Distribution.SalesPersonTargets

Attributes

Name Type Description
DisplayText string Uses the repository DisplayTextFormat to build the display text from the attributes and references of current object.
Id guid
ObjectVersion int32 The latest version of the extensible data object for the aggregate root for the time the object is loaded from the database. Can be used for optimistic locking.
PeriodDate datetime Calculated date representation of the target period (used for grouping, filtering and other auxiliary purposes). Required Filter(ge;le) ReadOnly
PeriodMonth byte Month of the period in which the target must be fulfilled (the period is determined by specifying a month and an year). Required Filter(ge;le)
PeriodYear int16 Year of the period in which the target must be fulfilled (the period is determined by specifying a month and an year). Required Filter(ge;le)
TargetAmount Amount (18, 2) nullable Target amount to be fulfilled by the specified sales person. Deprecated - use Target_Value. Currency: TargetAmountCurrency
TargetType TargetType Type of target. Defines the meaning of Target_Value. SALES-sales amount, BONUS-count of bonus progs, PACK-count of promo packs. Required Default("SALES") Filter(multi eq)
TargetValue decimal (9, 2) Value of target. Meaning depends on target type. Required Default(0)
TargetWeight decimal (5, 2) Relative weight of target, comparatively to other targets. Required Default(1)

References

Name Type Description
BonusProgram BonusPrograms (nullable) Bonus program Id when the target type is BONUS, null otherwise. Filter(multi eq)
Document SalesPersonTargets The to which this SalesPersonTargetLine belongs. Required Filter(multi eq)
ProductGroup ProductGroups (nullable) Product group for which the target is defined. Filter(multi eq)
PromotionalPackage PromotionalPackages (nullable) Promotional Package Id when the target type is PROMO, null otherwise. Filter(multi eq)
SalesPerson SalesPersons Sales person to whom the target is assigned. Required Filter(multi eq)
SalesPersonTarget SalesPersonTargets The to which this SalesPersonTargetLine belongs. Required Filter(multi eq) Owner
TargetAmountCurrency Currencies (nullable) Deprecated - use currency in document header. Filter(multi eq)

Attribute Details

DisplayText

Uses the repository DisplayTextFormat to build the display text from the attributes and references of current object.

Type: string
Category: Calculated Attributes
Supported Filters: NotFilterable
Supports Order By: ****
Show in UI: HiddenByDefault

Id

Type: guid
Indexed: True
Category: System
Supported Filters: Equals, EqualsIn
Default Value: NewGuid
Show in UI: CannotBeShown

ObjectVersion

The latest version of the extensible data object for the aggregate root for the time the object is loaded from the database. Can be used for optimistic locking.

Type: int32
Category: Extensible Data Object
Supported Filters: NotFilterable
Supports Order By: ****
Show in UI: HiddenByDefault

PeriodDate

Calculated date representation of the target period (used for grouping, filtering and other auxiliary purposes). Required Filter(ge;le) ReadOnly

Type: datetime
Category: System
Supported Filters: GreaterThanOrLessThan
Supports Order By: False
Show in UI: ShownByDefault

PeriodMonth

Month of the period in which the target must be fulfilled (the period is determined by specifying a month and an year). Required Filter(ge;le)

Type: byte
Category: System
Supported Filters: GreaterThanOrLessThan
Supports Order By: False
Show in UI: ShownByDefault

PeriodYear

Year of the period in which the target must be fulfilled (the period is determined by specifying a month and an year). Required Filter(ge;le)

Type: int16
Category: System
Supported Filters: GreaterThanOrLessThan
Supports Order By: False
Show in UI: ShownByDefault

TargetAmount

Target amount to be fulfilled by the specified sales person. Deprecated - use Target_Value. Currency: TargetAmountCurrency

Type: Amount (18, 2) nullable
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Show in UI: CannotBeShown

TargetType

Type of target. Defines the meaning of Target_Value. SALES-sales amount, BONUS-count of bonus progs, PACK-count of promo packs. Required Default("SALES") Filter(multi eq)

Type: TargetType
Category: System
Allowed values for the TargetType(Crm.Distribution.SalesPersonTargetLines.md#targettype) data attribute
Allowed Values (Crm.Distribution.SalesPersonTargetLinesRepository.TargetType Enum Members)

Value Description
SalesAmount SalesAmount value. Stored as 'SALES'.
Database Value: 'SALES'
Model Value: 0
Domain API Value: 'SalesAmount'
NumberOfApplied
BonusPrograms
NumberOfApplied
BonusPrograms value. Stored as 'BONUS'.
Database Value: 'BONUS'
Model Value: 1
Domain API Value: 'NumberOfApplied
BonusPrograms'
NumberOfPromotional
Packages
NumberOfPromotional
Packages value. Stored as 'PROMO'.
Database Value: 'PROMO'
Model Value: 2
Domain API Value: 'NumberOfPromotional
Packages'
LocationsCount LocationsCount value. Stored as 'LOCNT'.
Database Value: 'LOCNT'
Model Value: 3
Domain API Value: 'LocationsCount'

Supported Filters: Equals, EqualsIn
Supports Order By: False
Default Value: SalesAmount
Show in UI: ShownByDefault

TargetValue

Value of target. Meaning depends on target type. Required Default(0)

Type: decimal (9, 2)
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Default Value: 0
Show in UI: ShownByDefault

TargetWeight

Relative weight of target, comparatively to other targets. Required Default(1)

Type: decimal (5, 2)
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Default Value: 1
Show in UI: ShownByDefault

Reference Details

BonusProgram

Bonus program Id when the target type is BONUS, null otherwise. Filter(multi eq)

Type: BonusPrograms (nullable)
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: ShownByDefault

Document

The to which this SalesPersonTargetLine belongs. Required Filter(multi eq)

Type: SalesPersonTargets
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: ShownByDefault

ProductGroup

Product group for which the target is defined. Filter(multi eq)

Type: ProductGroups (nullable)
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: ShownByDefault

Back-End Default Expression:
obj.SalesPersonTarget.ProductGroup

Front-End Recalc Expressions:
obj.SalesPersonTarget.ProductGroup

PromotionalPackage

Promotional Package Id when the target type is PROMO, null otherwise. Filter(multi eq)

Type: PromotionalPackages (nullable)
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: ShownByDefault

SalesPerson

Sales person to whom the target is assigned. Required Filter(multi eq)

Type: SalesPersons
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: ShownByDefault

Back-End Default Expression:
obj.SalesPersonTarget.SalesPerson

Front-End Recalc Expressions:
obj.SalesPersonTarget.SalesPerson

SalesPersonTarget

The to which this SalesPersonTargetLine belongs. Required Filter(multi eq) Owner

Type: SalesPersonTargets
Category: System
Supported Filters: Equals, EqualsIn
Filterable Reference: True
Show in UI: ShownByDefault

TargetAmountCurrency

Deprecated - use currency in document header. Filter(multi eq)

Type: Currencies (nullable)
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: ShownByDefault

Back-End Default Expression:
obj.SalesPersonTarget.TargetCurrency

Front-End Recalc Expressions:
obj.SalesPersonTarget.TargetCurrency

API Methods

Methods that can be invoked in public APIs.

GetAllowedCustomPropertyValues

Gets the allowed values for the specified custom property for this entity object. If supported the result is ordered by property value. Some property value sources do not support ordering - in that case the result is not ordered.
Return Type: Collection Of CustomPropertyValue
Declaring Type: EntityObject
Domain API Request: GET

Parameters

  • customPropertyCode
    The code of the custom property
    Type: string

  • search
    The search text - searches by value or description. Can contain wildcard character %.
    Type: string
    Optional: True
    Default Value: null

  • exactMatch
    If true the search text should be equal to the property value
    Type: boolean
    Optional: True
    Default Value: False

  • orderByDescription
    If true the result is ordered by Description instead of Value. Note that ordering is not always possible.
    Type: boolean
    Optional: True
    Default Value: False

  • top
    The top clause - default is 10
    Type: int32
    Optional: True
    Default Value: 10

  • skip
    The skip clause - default is 0
    Type: int32
    Optional: True
    Default Value: 0

CreateNotification

Create a notification immediately in a separate transaction, and send a real-time event to the user.
Return Type: void
Declaring Type: EntityObject
Domain API Request: POST

Parameters

  • user
    The user.
    Type: Users

  • notificationClass
    The notification class.
    Type: string

  • subject
    The notification subject.
    Type: string

CreateCopy

Duplicates the object and its child objects belonging to the same aggregate. The duplicated objects are not saved to the data source but remain in the same transaction as the original object.
Return Type: EntityObject
Declaring Type: EntityObject
Domain API Request: POST

Business Rules

None

Front-End Business Rules

None

API

Domain API Query: https://demodb.my.erp.net/api/domain/odata/Crm_Distribution_SalesPersonTargetLines?$top=10

Domain API Query Builder: https://demodb.my.erp.net/api/domain/querybuilder#Crm_Distribution_SalesPersonTargetLines?$top=10