We have a requirement where two date fields Current Date and Agreement End date. The current date will always capture from the system date and the Agreement end date fill by the user.
Now the requirement is that the form should get inactive with some status reason when Current date == Agreement end date. Here Agreement end date can be 1 or 2 years ahead from the current date. The form should be inactive without opening the record as per the condition.
1. Navigate to flow.microsoft.com->Select Environment->Create new Schedule flow
2. Set Recurrence to run daily
3. Add List records to fetch records where new_agreenmentdate field value is equals to Today date
As you can see I have used function to check if new_agreementdate data is eq Today
It is always a best practice to generate fetch xml query from advanced find and use FetchXML builder tool from xrmtoolbox to generate the filter criteria to be used in Power Automate list records action.
4. Add Apply foreach and update record status.
Make sure you also check if record is already deactivated before updating the status of the record.
Original Community Forum Question – https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/395178/automatic-form-inactive-based-on-end-date
Hope this helps!