i am looking for a way to control the item purchase prices within specific period, so i am using the end date field located in the purchase price list as a deadline for users to select these specific items in their purchase order.
i want to make more control over that, so in case the user is selecting an item that is not within the period that i have set in purchase price, i dont want any cost to be showing for that item as an indicator for the user to know that today he / she is not allowed to purchase this item, however, when the user choose the item in a date that is after the purchase price end it, the system keeps showing a cost for that item in purchase order and this cost is the last direct cost located in item card.
is there a way to prevent the system from doing that so the user can get ZERO cost in purchase order for any item selected out of purchase price list date range no matter what the costs showing in the item card? i am looking for a way to let the system read the prices only from purchase price list all the time and completely ignore the costs showing in the item card.
You can achieve that using customization but not possible with standard BC, you need to store those fields and add some logic on the Item no. validation on the purchase similar to posting routine looks at GL Setup for the date range or user setup, you need to follow similar kind of design.
So is this no longer related to the pricing? If you want what’s been described in your most recent message a new field or set of fields could be added with a table extension. Use a codeunit to subscribe to OnValidate of the “No.” if it’s an item. Get the item and then check the dates based on the today() value
im sorry, maybe i didnt explain myself clearly. let me make it easier.
i am looking for a way to prevent the user from choosing items on purchase documents, but i need to control that using a date range (start and end date on item level) where users are not allowed to choose this particular item within this date range.
i hope this is clear now.
Middle paragraph has a contradiction from what I understood. I believe you need to use the “Purchase Blocked” field when an item no longer has a price. One way of achieving this would be to have a processing only report which you have as a job queue entry. The report can determine if it has pricing in the date or not. If it doesn’t then it updates the mentioned field to true. A user will not be able to see or add any items that are blocked for purchasing on purchase documents - that includes returns
Alternative would be to use an event subscriber for OnValidate of the No. field and have it check for purchase pricing in date. If it fails throw an error
Sohail Ahmed
953
YUN ZHU
848
Super User 2025 Season 1
Mansi Soni
602