Table of Contents

Crm.Presales.OfferLines Entity

Namespace: Crm.Presales

Detail records (lines) of Offers. Entity: Crm_Offer_Lines

Default Visualization

Default Display Text Format:
{LineNo}. {Offer.DocumentNo} {Offer.DocumentType.TypeName:T}
Default Search Members:
Offer.DocumentNo
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.Presales.Offers
Aggregate Root:
Crm.Presales.Offers

Attributes

Name Type Description
ChoiceGroupName string (60) nullable Name of a group of alternative lines, only one of which can be selected for ordering. Lines are grouped based on the exact name of the Choice Group.
CurrentBalanceBase Quantity The current balance of the product in the selected store and enterprise company. If lot, serial number or product variant are specified the quantity is calculated accordingly.
DeliveryTermDays int32 Delivery term in days. When Required Delivery Date is specified (not null), it takes precedence and this is ignored. Required Default(0)
DisplayText string Uses the repository DisplayTextFormat to build the display text from the attributes and references of current object.
GuaranteePeriodDays int32 nullable Guarantee period in days for the offered product. null for non-serviced products.
Id guid
IsSelected boolean True when the line is selected for further processing (ordering), false otherwise. Required Default(true)
LineAmount Amount (14, 2) Amount for the line in the currency of the parent document. Usually equals Quantity * Unit_Price. When Quantity = 0, Unit Price is undefined and this contains the total line amount. Currency: Offer.DocumentCurrency Required Default(0)
LineCustomDiscountPercent decimal (7, 6) Operator defined discount percentage, specified for this line. Required Default(0)
LineNo int32 Line number, unique within the Offer. Usually is increasing number like 10, 20, 30, ... when initially entering the Offer (in order to allow insertions with adjustment documents). Required Filter(eq)
LineStandardDiscount
Percent
decimal (7, 6) The discount percentage, applied through the standard discount policy. Required Default(0) ReadOnly
Notes string (max) nullable Notes for this OfferLine.
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.
ProductDescription MultilanguageString (254) The description of the offered product. Initially copied from the name of the offered product. Required Filter(like)
Quantity Quantity (12, 3) Quantity offered. Unit: QuantityUnit Required Default(1)
QuantityBase Quantity (12, 3) The equivalent of Quantity in the base measurement unit of the Product. Unit: Product.BaseMeasurementCategory.BaseUnit Required ReadOnly
RequiredDeliveryDate date nullable Date, when the delivery is required. Alternative to Delivery Term Days. When null, Delivery Term Days is used. Filter(ge;le)
StandardQuantityBase Quantity (12, 3) The theoretical quantity in base measurement unit according to the current measurement dimensions for the product. Used to measure the execution. Unit: Product.BaseMeasurementCategory.BaseUnit Required ReadOnly Introduced in version 18.2
UnitPrice Amount (14, 5) The unit price of the offered product. It is specified in the measurement unit of Quantity. Currency: Offer.DocumentCurrency Required Default(0)
Variant string (60) nullable Name or number of variant of the whole offer. When multiple lines have the same variant, they are selected for ordering together.

References

Name Type Description
Document Offers The to which this OfferLine belongs. Required Filter(multi eq)
LineDiscount LineDiscounts (nullable) When not null, contains the discount policy selected for this line. Filter(multi eq)
LineEndCustomerParty Parties (nullable) The end customer is the customer of the dealer. It is stored for information purposes only. The end customer may not have customer definition, just party. Filter(multi eq) Introduced in version 21.1.2.96
Offer Offers The to which this OfferLine belongs. Required Filter(multi eq) Owner
Product Products The offered product. Required Filter(multi eq)
ProductCode ProductCodes (nullable) Not null, when the product is selected using a coding system code. Filter(multi eq)
ProductPrice ProductPrices (nullable) Not null when the price has been selected from the list of valid standard prices. Filter(multi eq)
QuantityUnit MeasurementUnits The measurement unit of Quantity. Required Filter(multi eq)

Attribute Details

ChoiceGroupName

Name of a group of alternative lines, only one of which can be selected for ordering. Lines are grouped based on the exact name of the Choice Group.

Type: string (60) nullable
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Maximum Length: 60
Show in UI: HiddenByDefault

CurrentBalanceBase

The current balance of the product in the selected store and enterprise company. If lot, serial number or product variant are specified the quantity is calculated accordingly.

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

DeliveryTermDays

Delivery term in days. When Required Delivery Date is specified (not null), it takes precedence and this is ignored. Required Default(0)

Type: int32
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Default Value: 0
Show in UI: HiddenByDefault

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

GuaranteePeriodDays

Guarantee period in days for the offered product. null for non-serviced products.

Type: int32 nullable
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Show in UI: HiddenByDefault

Front-End Recalc Expressions:
obj.Product.GuaranteePeriodDays

Id

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

IsSelected

True when the line is selected for further processing (ordering), false otherwise. Required Default(true)

Type: boolean
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Default Value: True
Show in UI: HiddenByDefault

LineAmount

Amount for the line in the currency of the parent document. Usually equals Quantity * Unit_Price. When Quantity = 0, Unit Price is undefined and this contains the total line amount. Currency: Offer.DocumentCurrency Required Default(0)

Type: Amount (14, 2)
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Default Value: Constant
Show in UI: ShownByDefault

Back-End Default Expression:
IIF( ( ( ( obj.Quantity == null) OrElse ( obj.UnitPrice == null)) OrElse ( ( obj.Quantity.Value == 0) AndAlso ( obj.UnitPrice.Value == 0))), obj.LineAmount, ( ( ( obj.Quantity.Value * obj.UnitPrice) * ( 1 - obj.LineStandardDiscountPercent)) * ( 1 - obj.LineCustomDiscountPercent)).Round( ))

Front-End Recalc Expressions:
IIF( ( ( ( obj.Quantity == null) OrElse ( obj.UnitPrice == null)) OrElse ( ( obj.Quantity.Value == 0) AndAlso ( obj.UnitPrice.Value == 0))), obj.LineAmount, ( ( ( obj.Quantity.Value * obj.UnitPrice) * ( 1 - obj.LineStandardDiscountPercent)) * ( 1 - obj.LineCustomDiscountPercent)).Round( ))

LineCustomDiscountPercent

Operator defined discount percentage, specified for this line. Required Default(0)

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

LineNo

Line number, unique within the Offer. Usually is increasing number like 10, 20, 30, ... when initially entering the Offer (in order to allow insertions with adjustment documents). Required Filter(eq)

Type: int32
Category: System
Supported Filters: Equals
Supports Order By: False
Show in UI: ShownByDefault

Back-End Default Expression:
( obj.Offer.Lines.Select( c => c.LineNo).DefaultIfEmpty( 0).Max( ) + 10)

Front-End Recalc Expressions:
( obj.Offer.Lines.Select( c => c.LineNo).DefaultIfEmpty( 0).Max( ) + 10)

LineStandardDiscountPercent

The discount percentage, applied through the standard discount policy. Required Default(0) ReadOnly

Type: decimal (7, 6)
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Default Value: 0
Show in UI: HiddenByDefault

Back-End Default Expression:
obj.LineDiscount.DiscountPercent

Front-End Recalc Expressions:
IIF( ( obj.LineDiscount == null), 0, obj.LineDiscount.DiscountPercent)

Notes

Notes for this OfferLine.

Type: string (max) nullable
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Maximum Length: 2147483647
Show in UI: HiddenByDefault

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

ProductDescription

The description of the offered product. Initially copied from the name of the offered product. Required Filter(like)

Type: MultilanguageString (254)
Category: System
Supported Filters: Like
Supports Order By: False
Show in UI: HiddenByDefault

Back-End Default Expression:
obj.Product.Name

Front-End Recalc Expressions:
obj.Product.Name

Quantity

Quantity offered. Unit: QuantityUnit Required Default(1)

Type: Quantity (12, 3)
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Default Value: Constant
Show in UI: ShownByDefault

QuantityBase

The equivalent of Quantity in the base measurement unit of the Product. Unit: Product.BaseMeasurementCategory.BaseUnit Required ReadOnly

Type: Quantity (12, 3)
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Show in UI: HiddenByDefault

Back-End Default Expression:
IIF( ( ( ( obj.Quantity == null) OrElse ( obj.QuantityUnit == null)) OrElse ( obj.Product == null)), obj.QuantityBase, obj.Quantity.ConvertTo( obj.Product.BaseUnit, obj.Product))

Front-End Recalc Expressions:
IIF( ( ( ( obj.Quantity == null) OrElse ( obj.QuantityUnit == null)) OrElse ( obj.Product == null)), obj.QuantityBase, obj.Quantity.ConvertTo( obj.Product.BaseUnit, obj.Product))

RequiredDeliveryDate

Date, when the delivery is required. Alternative to Delivery Term Days. When null, Delivery Term Days is used. Filter(ge;le)

Type: date nullable
Category: System
Supported Filters: GreaterThanOrLessThan
Supports Order By: False
Show in UI: HiddenByDefault

Back-End Default Expression:
obj.Offer.RequiredDeliveryDate

Front-End Recalc Expressions:
IIF( ( obj.DeliveryTermDays == 0), obj.RequiredDeliveryDate, null) obj.Offer.RequiredDeliveryDate

StandardQuantityBase

The theoretical quantity in base measurement unit according to the current measurement dimensions for the product. Used to measure the execution. Unit: Product.BaseMeasurementCategory.BaseUnit Required ReadOnly Introduced in version 18.2

Type: Quantity (12, 3)
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Show in UI: HiddenByDefault

Back-End Default Expression:
IIF( ( ( ( obj.Quantity == null) OrElse ( obj.QuantityUnit == null)) OrElse ( obj.Product == null)), obj.StandardQuantityBase, obj.Quantity.ConvertTo( obj.Product.BaseUnit, obj.Product))

Front-End Recalc Expressions:
IIF( ( ( ( obj.Quantity == null) OrElse ( obj.QuantityUnit == null)) OrElse ( obj.Product == null)), obj.StandardQuantityBase, obj.Quantity.ConvertTo( obj.Product.BaseUnit, obj.Product))

UnitPrice

The unit price of the offered product. It is specified in the measurement unit of Quantity. Currency: Offer.DocumentCurrency Required Default(0)

Type: Amount (14, 5)
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Default Value: Constant
Show in UI: ShownByDefault

Back-End Default Expression:
( CalculateUnitPriceFromLineAmount( obj.LineAmount, obj.Quantity, obj.LineStandardDiscountPercent, obj.LineCustomDiscountPercent) ?? obj.UnitPrice)

Front-End Recalc Expressions:
obj.CalculateUnitPrice( obj.Product, obj.ProductPrice, obj.QuantityUnit, obj.Offer)

Variant

Name or number of variant of the whole offer. When multiple lines have the same variant, they are selected for ordering together.

Type: string (60) nullable
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Maximum Length: 60
Show in UI: HiddenByDefault

Reference Details

Document

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

Type: Offers
Indexed: True
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: ShownByDefault

LineDiscount

When not null, contains the discount policy selected for this line. Filter(multi eq)

Type: LineDiscounts (nullable)
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: HiddenByDefault

Front-End Recalc Expressions:
obj.DetermineLineDiscount( obj.RequiredDeliveryDate, obj.Offer.Customer, obj.Offer.ShipToCustomer, obj.Product, obj.Quantity, obj.QuantityUnit, obj.Offer.EnterpriseCompany, obj.Offer.EnterpriseCompanyLocation, obj.Offer.PriceList, obj.LineDiscount)

LineEndCustomerParty

The end customer is the customer of the dealer. It is stored for information purposes only. The end customer may not have customer definition, just party. Filter(multi eq) Introduced in version 21.1.2.96

Type: Parties (nullable)
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: HiddenByDefault

Back-End Default Expression:
obj.Offer.EndCustomerParty

Front-End Recalc Expressions:
obj.Offer.EndCustomerParty

Offer

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

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

Product

The offered product. Required Filter(multi eq)

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

Back-End Default Expression:
IIF( ( obj.ProductCode.Product == null), obj.Product, obj.ProductCode.Product)

Front-End Recalc Expressions:
IIF( ( obj.ProductCode.Product == null), obj.Product, obj.ProductCode.Product)

ProductCode

Not null, when the product is selected using a coding system code. Filter(multi eq)

Type: ProductCodes (nullable)
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: HiddenByDefault

ProductPrice

Not null when the price has been selected from the list of valid standard prices. Filter(multi eq)

Type: ProductPrices (nullable)
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: HiddenByDefault

Front-End Recalc Expressions:
DetermineProductPrice( obj.Product, obj.Quantity, obj.QuantityUnit, obj.RequiredDeliveryDate, obj.Offer.Customer, obj.Offer.ShipToCustomer, obj.Offer.EnterpriseCompany, obj.Offer.EnterpriseCompanyLocation, null, obj.Offer.PriceList, obj.ProductPrice)

QuantityUnit

The measurement unit of Quantity. Required Filter(multi eq)

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

Back-End Default Expression:
obj.Product.MeasurementUnit.IfNullThen( obj.QuantityUnit)

Front-End Recalc Expressions:
obj.Product.MeasurementUnit.IfNullThen( obj.QuantityUnit)

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

API

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

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