How to use the setIsValid Method in Dataverse / Dynamics 365


The setIsValid method is used to validate field values in Model-driven apps. It can mark a field as valid or invalid based on custom validation logic. The method takes a boolean value to mark the column value as valid or invalid, and an optional message to display when the value is invalid. The article provides an example of using the setIsValid method to ensure that the "End Date" is earlier than or equal to the "Start Date" in a function. The function is registered on the "On Change" event of the "Start Date" and "End Date" fields. If the End Date is smaller than the Start Date, an error message is displayed.


Article 3m

Login now to access my digest by 365.Training

Learn how my digest works
Features
  • Articles, blogs, podcasts, training, and videos
  • Quick read TL;DRs for each item
  • Advanced filtering to prioritize what you care about
  • Quick views to isolate what you are looking for right now
  • Save your favorite items
  • Share your favorites
  • Snooze items you want to revisit when you have more time