Crm.Customers Entity
Namespace: Crm
Customer contracts list. For each combination of Enterprise Company and external Party there can be zero or one records of this. Entity: Crm_Customers
Default Visualization
Default Display Text Format:
{Party.PartyName:T}
Default Search Members:
Number; Party.PartyName
Code Data Member:
Number
Name Data Member:
Party.PartyName
Category: Definitions
Show in UI: ShownByDefault
Layout category attribute: CustomerTypeId
Track Changes
Min level: 1 - Track last changes only
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 Tree
Attributes
Name | Type | Description |
---|---|---|
Active | boolean | True if the customer is active, false - not to list in combo boxes for choosing in new documents. Required Default(true) Filter(eq) |
AllowUseAsPrimaryCustomer | boolean | Specifies whether to allow the customer to be used as primary customer in a sales deal. Required Default(false) Filter(eq) |
AllowUseAsShipToCustomer | boolean | True to allow the customer to be used as ship to customer in a sales deal. Required Default(false) Filter(eq) |
CreationTime | datetime nullable | Date and time when the Customer was created. Filter(ge;le) ReadOnly |
CreationUser | string (64) nullable | Login name of the user, who created the Customer. Filter(like) ReadOnly |
CreditLimit | Amount (18, 2) nullable | Total credit limit for the customer in the enterprise company base currency. null means there is no limit. Currency: EnterpriseCompany?.BaseCurrency |
DefaultDeliveryTermDays | int32 | Default term in days for goods delivery, starting at the day of sale. Required Default(0) |
DefaultPaymentStartDays | int32 | Specifies the number of days after the sales order, when the payment becomes due. 0 means that the payment is due immediately. Required Default(0) |
DefaultPaymentTermDays | int32 | Default payment term in days when issuing documents for this customer. Required Default(0) |
DisplayText | string | Uses the repository DisplayTextFormat to build the display text from the attributes and references of current object. |
FromDate | datetime nullable | Start date of the customer relationship. Default(Today) Filter(ge;le) |
GracePeriodDays | int32 | Number of days after the payment deadline, during which the system still allows new sales orders for the customer. Required Default(0) |
Id | guid | |
Number | string (16) nullable | Unique customer number. Filter(eq;like) ORD |
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. |
PersistSalesOrdersLots | boolean | If checked, specifies that the lots set in the Sales orders for this customer, cannot be changed during the execution of the Store transactions for these Sales orders. Required Default(false) Filter(eq) |
ThruDate | datetime nullable | The date of customer relationship termination. null for active customers. Filter(ge;le) |
UpdateTime | datetime nullable | Date and time when the Customer was last updated. Filter(ge;le) ReadOnly |
UpdateUser | string (64) nullable | Login name of the user, who last updated the Customer. Filter(like) ReadOnly |
References
Name | Type | Description |
---|---|---|
CollectionsResponsible Employee |
CompanyEmployees (nullable) | The employee, who is responsible for the collections from the customer. Filter(multi eq) |
CustomerType | CustomerTypes (nullable) | The user-defined type of this customer. null when there is no specific type. Record-level security from the customer type is applied to the individual customers and can be used for security purposes. Filter(multi eq) |
DefaultCurrency | Currencies (nullable) | The default currency to use when creating new documents for this customer. Filter(multi eq) |
DefaultDistributionChannel | DistributionChannels (nullable) | The default distribution channel used when selling to the customer. Filter(multi eq) |
DefaultPaymentAccount | PaymentAccounts (nullable) | The default payment account to use when creating new documents for this customer. Filter(multi eq) |
DefaultPaymentType | PaymentTypes (nullable) | If not null, specifies default payment type for the sales, offers and invoices for this customer. Filter(multi eq) |
DefaultPriceList | PriceLists (nullable) | If not null, specifies default price list when selling to this customer. Filter(multi eq) |
EnterpriseCompany | EnterpriseCompanies (nullable) | The Enterprise Company for which this customer is recorded. The same external party can be listed with different conditions for the different enterprise companies. Filter(multi eq) |
Party | Parties | Base party Id. Required Filter(multi eq) FilterableReference |
SalesPerson | SalesPersons (nullable) | The default sales person for new sales documents for this customer. Filter(multi eq) |
ServicedByEnterprise CompanyLocation |
CompanyLocations (nullable) | The enterprise company location, which sells to this client by default. Filter(multi eq) |
Child Collections
Name | Type | Description |
---|---|---|
Products | CustomerProducts | List of CustomerProduct (Crm.CustomerProducts.md) child objects, based on the Crm.CustomerProduct.Customer (Crm.CustomerProducts.md#customer) back reference |
Attribute Details
Active
True if the customer is active, false - not to list in combo boxes for choosing in new documents. Required
Default(true)
Filter(eq)
Type: boolean
Category: System
Supported Filters: Equals
Supports Order By: False
Default Value: True
Show in UI: ShownByDefault
AllowUseAsPrimaryCustomer
Specifies whether to allow the customer to be used as primary customer in a sales deal. Required
Default(false)
Filter(eq)
Type: boolean
Category: System
Supported Filters: Equals
Supports Order By: False
Default Value: False
Show in UI: ShownByDefault
AllowUseAsShipToCustomer
True to allow the customer to be used as ship to customer in a sales deal. Required
Default(false)
Filter(eq)
Type: boolean
Category: System
Supported Filters: Equals
Supports Order By: False
Default Value: False
Show in UI: ShownByDefault
CreationTime
Date and time when the Customer was created. Filter(ge;le)
ReadOnly
Type: datetime nullable
Category: System
Supported Filters: GreaterThanOrLessThan
Supports Order By: False
Show in UI: HiddenByDefault
CreationUser
Login name of the user, who created the Customer. Filter(like)
ReadOnly
Type: string (64) nullable
Category: System
Supported Filters: Like
Supports Order By: False
Maximum Length: 64
Show in UI: HiddenByDefault
CreditLimit
Total credit limit for the customer in the enterprise company base currency. null means there is no limit. Currency: EnterpriseCompany?.BaseCurrency
Type: Amount (18, 2) nullable
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Show in UI: ShownByDefault
Back-End Default Expression:
IIF( ( obj.DefaultCurrency != null), obj.EnterpriseCompany.DefaultCustomerCreditLimitBase, obj.CreditLimit)
Front-End Recalc Expressions:
IIF( ( obj.DefaultCurrency != null), obj.EnterpriseCompany.DefaultCustomerCreditLimitBase, obj.CreditLimit)
DefaultDeliveryTermDays
Default term in days for goods delivery, starting at the day of sale. Required
Default(0)
Type: int32
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Default Value: 0
Show in UI: ShownByDefault
DefaultPaymentStartDays
Specifies the number of days after the sales order, when the payment becomes due. 0 means that the payment is due immediately. Required
Default(0)
Type: int32
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Default Value: 0
Show in UI: ShownByDefault
DefaultPaymentTermDays
Default payment term in days when issuing documents for this customer. Required
Default(0)
Type: int32
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Default Value: 0
Show in UI: ShownByDefault
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
FromDate
Start date of the customer relationship. Default(Today)
Filter(ge;le)
Type: datetime nullable
Category: System
Supported Filters: GreaterThanOrLessThan
Supports Order By: False
Default Value: CurrentDate
Show in UI: ShownByDefault
GracePeriodDays
Number of days after the payment deadline, during which the system still allows new sales orders for the customer. Required
Default(0)
Type: int32
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Default Value: 0
Show in UI: ShownByDefault
Id
Type: guid
Indexed: True
Category: System
Supported Filters: Equals, EqualsIn
Default Value: NewGuid
Show in UI: CannotBeShown
Number
Unique customer number. Filter(eq;like)
ORD
Type: string (16) nullable
Indexed: True
Category: System
Supported Filters: Equals, Like
Supports Order By: True
Maximum Length: 16
Show in UI: ShownByDefault
Back-End Default Expression:
obj.IncMax( o => o.Number, null, "000000")
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
PersistSalesOrdersLots
If checked, specifies that the lots set in the Sales orders for this customer, cannot be changed during the execution of the Store transactions for these Sales orders. Required
Default(false)
Filter(eq)
Type: boolean
Category: System
Supported Filters: Equals
Supports Order By: False
Default Value: False
Show in UI: ShownByDefault
ThruDate
The date of customer relationship termination. null for active customers. Filter(ge;le)
Type: datetime nullable
Category: System
Supported Filters: GreaterThanOrLessThan
Supports Order By: False
Show in UI: ShownByDefault
UpdateTime
Date and time when the Customer was last updated. Filter(ge;le)
ReadOnly
Type: datetime nullable
Category: System
Supported Filters: GreaterThanOrLessThan
Supports Order By: False
Show in UI: HiddenByDefault
UpdateUser
Login name of the user, who last updated the Customer. Filter(like)
ReadOnly
Type: string (64) nullable
Category: System
Supported Filters: Like
Supports Order By: False
Maximum Length: 64
Show in UI: HiddenByDefault
Reference Details
CollectionsResponsibleEmployee
The employee, who is responsible for the collections from the customer. Filter(multi eq)
Type: CompanyEmployees (nullable)
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: ShownByDefault
CustomerType
The user-defined type of this customer. null when there is no specific type. Record-level security from the customer type is applied to the individual customers and can be used for security purposes. Filter(multi eq)
Type: CustomerTypes (nullable)
Indexed: True
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: ShownByDefault
DefaultCurrency
The default currency to use when creating new documents for this customer. Filter(multi eq)
Type: Currencies (nullable)
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: ShownByDefault
Front-End Recalc Expressions:
obj.EnterpriseCompany.BaseCurrency
DefaultDistributionChannel
The default distribution channel used when selling to the customer. Filter(multi eq)
Type: DistributionChannels (nullable)
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: ShownByDefault
DefaultPaymentAccount
The default payment account to use when creating new documents for this customer. Filter(multi eq)
Type: PaymentAccounts (nullable)
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: ShownByDefault
Front-End Recalc Expressions:
obj.DefaultPaymentType.GetDefaultPaymentAccount( ).IfNullThen( obj.DefaultPaymentAccount)
DefaultPaymentType
If not null, specifies default payment type for the sales, offers and invoices for this customer. Filter(multi eq)
Type: PaymentTypes (nullable)
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: ShownByDefault
DefaultPriceList
If not null, specifies default price list when selling to this customer. Filter(multi eq)
Type: PriceLists (nullable)
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: ShownByDefault
EnterpriseCompany
The Enterprise Company for which this customer is recorded. The same external party can be listed with different conditions for the different enterprise companies. Filter(multi eq)
Type: EnterpriseCompanies (nullable)
Indexed: True
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: HiddenByDefault
Front-End Recalc Expressions:
obj.Transaction.CurrentEnterpriseCompany
Party
Base party Id. Required
Filter(multi eq)
FilterableReference
Type: Parties
Indexed: True
Category: System
Supported Filters: Equals, EqualsIn
Filterable Reference: True
Show in UI: ShownByDefault
SalesPerson
The default sales person for new sales documents for this customer. Filter(multi eq)
Type: SalesPersons (nullable)
Indexed: True
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: ShownByDefault
ServicedByEnterpriseCompanyLocation
The enterprise company location, which sells to this client by default. Filter(multi eq)
Type: CompanyLocations (nullable)
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: HiddenByDefault
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: stringsearch
The search text - searches by value or description. Can contain wildcard character %.
Type: string
Optional: True
Default Value: nullexactMatch
If true the search text should be equal to the property value
Type: boolean
Optional: True
Default Value: FalseorderByDescription
If true the result is ordered by Description instead of Value. Note that ordering is not always possible.
Type: boolean
Optional: True
Default Value: Falsetop
The top clause - default is 10
Type: int32
Optional: True
Default Value: 10skip
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: UsersnotificationClass
The notification class.
Type: stringsubject
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
- R27159 Customer - From Date Less Than Thru Date
- R27168 Customer - Check Serviced By Enterprise Company Location
- R37198 Customer - Assign Sales Person
Front-End Business Rules
- R30214-1 Customer - Set Credit Limit (Recalc)
- R30214-2 Customer - Set Default Currency (Recalc)
- R30214-3 Customer - Set Default Payment Account (Recalc)
- R30214-4 Customer - Default Enterprise Company
API
Domain API Query: https://demodb.my.erp.net/api/domain/odata/Crm_Customers?$top=10
Domain API Query Builder: https://demodb.my.erp.net/api/domain/querybuilder#Crm_Customers?$top=10