
Hi,
Could anybody explain what exactly are Valid From and Valid To fields on Product entity?
I was testing a product with Valid To date in the past. But looks like this is doing nothing. The product remains active even though the date is in the past and I can still access the product on quote forms.
Is there any other way to restrict the users from using a particular product on quotes/orders without retiring the product?
Cheers
Deeksha
Hi Deeksha,
These two fields are described in this document.
There's no business logic associated with these fields except that the Valid To date must be later than the Valid From date. If required, you can implement your own business logic in these fields with a workflow, plug-in, or by using the Dynamics 365 Customer Engagement Web Services.
If you want to make products that are not in validity period unselectable in a codeless way, we can use Power Automate.
Step 1. First create a Yes/No field in Product entity, the default vaue is No.
Step 2. Then create an Instant cloud flow.
Run this Instant cloud flow, so the Yes/No field of all products within the validity period are changed to Yes.
Step 3. Create a Scheduled cloud flow which repeats every day at 12:00 AM.
Overview:
Details:
Step 3. Edit the Product Lookup View.
Edit filters and add a row.
Yes/No field Equals Yes.
This way, only products that are within the validity period can be searched for. You can also add this filter to the other lookup views of Product.