Date Formulas validation using Regex in model-driven

Forum Post: Change the Filter On option on Opportunity Associated View for Account form

Hello everyone,

In Dynamics NAV, we can create a data type that can have the below date formulas:…/

What I am trying to achieve is the following:

I have a custom model-driven application in dataverse with some custom tables.
In one of the tables, I have a text field called “Date Formula” and I would like to do a validation on the characters for that field that should only accept the date list template mentioned in the above blog post provided.

Example: If the user type 1M+CM which (Returns the last date of the following month) the date field will be validated and the form can be saved.
However, if the user typed something like this: [email protected] or something that is not validated in the date formula blog post mentioned the form will never be saved.

In addition here is another complex example that will be validated if he typed, CW+1DorCW+WD1 which returns the Monday of Next Week.

I believe that the above requirements require plugin customization with using Regex Expression to validate & match the same date formulas in NAV.

Could you please advise what is the best solution to implement the above requirements? I would highly appreciate it if you can provide an example or documentation to implement it.

Please let me know if you need further information.

Best regards,

Source link

Leave a reply

Please enter your comment!
Please enter your name here