Once the Price Records are generated (from Contract from Agreements & Promotions line items), you can use (search) them in Quotes, PriceListsPrice Lists, etc. to employ the conditions which they represent.
You are creating a Quote, and would like to calculate the Promotion Discount for the given Customer and Product. That discount is based on the previously made Promotion Contract. You already know that the Promotion Contract is converted into Price Records. So what you really need to do in the Quote calculation logic is to find the relevant Price Records for the given Customer and Product.
- Price Records are NOT defined for a specific product and customer but rather for a group of products and a group of customers.
- Potentially more Price Records can be valid at the same time for the same product and customer – so you need to figure out which conditions to use. (Here, for example, the Priority field can be used. But that is not a universal solution.)
- Price Records are not valid indefinitely, but only for a limited time period.
How to Search for Relevant Price Records
The trickiest part is the filter for products and customers – that's what we show in the example below. You need to provide here the other filters (for Date and Priority, etc.) as well.