Table of Contents

Production.Technologies.PrincipalRecipeIngredients

Template for material usage of a principal recipe.

General

Namespace: Production.Technologies
Repository: Production.Technologies.PrincipalRecipeIngredients
Base Table: Prd_Principal_Recipe_Ingredients
API access: ReadWrite

Visualization

Display Format: {IngredientName}
Search Members: IngredientName
Name Member: IngredientName
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:
Production.Technologies.PrincipalRecipes
Aggregate Root:
General.Products.ProductGroups

Attributes

Name Type Description
ConditionalProperty
Description
MultilanguageString (254) nullable Description of the chosen conditional property value
ConditionalPropertyValue string (254) nullable When not NULL, specifies that, when creating recipe, the ingredient will be added only if the main product property, specified in "Conditional Property" equals the specified value
FixedScrapQuantity Quantity (18, 3) Fixed scrap quantity for setup.Unit: UsageUnit Required Default(0)
IngredientId guid OBSOLETE! Do not use! The Id of the ingredient. When copying principal recipes, this Id remains the same for the new principal recipe to provide upgrade path for old recipes. Obsolete Required Default(New Guid) Filter(multi eq) Obsoleted in version 22.1.6.61
IngredientName string (254) The principal name of the ingredient.Required Filter(like)
LineOrd int32 The position of the line in the recipe modelRequired
ScrapRate decimal (7, 6) The usual percentage (0..1) of scrap of the raw material; inflates the requirements of this material for this recipe.Required Default(0) Filter(ge;le)
UsageQuantity Quantity (18, 6) nullable Quantity to be consumed from the material. NULL means that the quantity is specified with formulaUnit: UsageUnit Default(1) Filter(ge;le)
UsageQuantityFormula string (max) nullable Specifies formula for the usage quantity. The formula can reference properties in [Property_Code] style, just like products name and description mask. The formula can contain *, /, + and - operators. The formula can also be simple number, directly specifying quantity<Prop_Name> style, just like products name and description mask. The formula can contain *, /, + and - operators. The formula can also be simple number, directly specifying quantity.

References

Name Type Description
ConditionalProperty CustomProperties (nullable) When not NULL, specifies that, when creating recipe, the ingredient will be added only if this property is set for the main product
ConditionalProperty
AllowedValue
CustomPropertyAllowedValues (nullable) When not NULL, specifies that, when creating recipe, the ingredient will be added only if the main product property, specified in "Conditional Property" equals the specified value
DefaultMaterial Products (nullable) If not NULL, points to default product for this ingredient
DefaultStore Stores (nullable) The default store from which to retrieve the material.
MaterialFromProperty CustomProperties (nullable) When not NULL, specifies that the material will be obtained from the value of the specified property. The property must have allowed values in the Products domain.
MaterialGroup ProductGroups Filter for choosing specific material in the recipe (Gen_Product_Groups_Table)
Operation Operations (nullable) Specifies for which operation this ingredient will be used.
PrincipalRecipe PrincipalRecipes The to which this PrincipalRecipeIngredient belongs. Required Filter(multi eq) Owner
UsageUnit MeasurementUnits The measurement unit of Usage_Quantity. The selected item must support the specified unit

System Attributes

Name Type Description
Id guid The Id of the recipe ingredient. This changes for each different line of each different recipe in contrast to the ingredient id, which might be the same for many principal recipes
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.
DisplayText string Uses the repository DisplayTextFormat to build the display text from the attributes and references of current object.

Attribute Details

ConditionalPropertyDescription

Description of the chosen conditional property value

Type: MultilanguageString (254) nullable
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Show in UI: ShownByDefault

ConditionalPropertyValue

When not NULL, specifies that, when creating recipe, the ingredient will be added only if the main product property, specified in "Conditional Property" equals the specified value

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

FixedScrapQuantity

Fixed scrap quantity for setup.Unit: UsageUnit Required Default(0)

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

IngredientId

OBSOLETE! Do not use! The Id of the ingredient. When copying principal recipes, this Id remains the same for the new principal recipe to provide upgrade path for old recipes. Obsolete Required Default(New Guid) Filter(multi eq) Obsoleted in version 22.1.6.61

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

IngredientName

The principal name of the ingredient.Required Filter(like)

Type: string (254)
Category: System
Supported Filters: Like
Supports Order By: False
Maximum Length: 254
Show in UI: ShownByDefault

Front-End Recalc Expressions:
obj.DefaultMaterial.Name

LineOrd

The position of the line in the recipe modelRequired

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

Back-End Default Expression:
( obj.PrincipalRecipe.Ingredients.Select( c => c.LineOrd).DefaultIfEmpty( 0).Max( ) + 1)

Front-End Recalc Expressions:
( obj.PrincipalRecipe.Ingredients.Select( c => c.LineOrd).DefaultIfEmpty( 0).Max( ) + 1)

ScrapRate

The usual percentage (0..1) of scrap of the raw material; inflates the requirements of this material for this recipe.Required Default(0) Filter(ge;le)

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

UsageQuantity

Quantity to be consumed from the material. NULL means that the quantity is specified with formulaUnit: UsageUnit Default(1) Filter(ge;le)

Type: Quantity (18, 6) nullable
Category: System
Supported Filters: GreaterThanOrLessThan
Supports Order By: False
Default Value: Constant
Show in UI: ShownByDefault

Front-End Recalc Expressions:
IIF( ( obj.UsageQuantityFormula != null), null, obj.UsageQuantity)

UsageQuantityFormula

Specifies formula for the usage quantity. The formula can reference properties in [Property_Code] style, just like products name and description mask. The formula can contain *, /, + and - operators. The formula can also be simple number, directly specifying quantity<Prop_Name> style, just like products name and description mask. The formula can contain *, /, + and - operators. The formula can also be simple number, directly specifying quantity.

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

Front-End Recalc Expressions:
IIF( ( obj.UsageQuantity != null), null, obj.UsageQuantityFormula)

Id

The Id of the recipe ingredient. This changes for each different line of each different recipe in contrast to the ingredient id, which might be the same for many principal recipes

Type: guid
Indexed: True
Category: System
Supported Filters: Equals, GreaterThanOrLessThan, 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

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

Reference Details

ConditionalProperty

When not NULL, specifies that, when creating recipe, the ingredient will be added only if this property is set for the main product

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

ConditionalPropertyAllowedValue

When not NULL, specifies that, when creating recipe, the ingredient will be added only if the main product property, specified in "Conditional Property" equals the specified value

Type: CustomPropertyAllowedValues (nullable)
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: CannotBeShown

DefaultMaterial

If not NULL, points to default product for this ingredient

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

DefaultStore

The default store from which to retrieve the material.

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

MaterialFromProperty

When not NULL, specifies that the material will be obtained from the value of the specified property. The property must have allowed values in the Products domain.

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

MaterialGroup

Filter for choosing specific material in the recipe (Gen_Product_Groups_Table)

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

Operation

Specifies for which operation this ingredient will be used.

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

PrincipalRecipe

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

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

UsageUnit

The measurement unit of Usage_Quantity. The selected item must support the specified unit

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

Front-End Recalc Expressions:
obj.DefaultMaterial.BaseUnit

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

  • priority
    The notification priority.
    Type: Systems.Core.NotificationsRepository.Priority
    Allowed values for the Priority(Systems.Core.Notifications.md#priority) data attribute
    Allowed Values (Systems.Core.NotificationsRepository.Priority Enum Members)

    Value Description
    Background Background value. Stored as 1.
    Model Value: 1
    Domain API Value: 'Background'
    Low Low value. Stored as 2.
    Model Value: 2
    Domain API Value: 'Low'
    Normal Normal value. Stored as 3.
    Model Value: 3
    Domain API Value: 'Normal'
    High High value. Stored as 4.
    Model Value: 4
    Domain API Value: 'High'
    Urgent Urgent value. Stored as 5.
    Model Value: 5
    Domain API Value: 'Urgent'

    Optional: True
    Default Value: Normal

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 Entity Set: Production_Technologies_PrincipalRecipeIngredients

Domain API Entity Type: Production_Technologies_PrincipalRecipeIngredient

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

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