Follow my blog for more interesting topics on Dynamics 365, Portals and Power Platform. For training and consulting, write to us at email@example.com
CRM tips from the vault – A series which I have started on request of my blog readers who are quite new to CRM. My blog focus on niche topics which mostly require a prior in-depth understanding of Dynamics 365. However in this series I will mostly cover the topics which are quite simple, used in almost every project implementations and more importantly have withstood the test of time.
Here is my Tip 7 – How can you determine if FormMode is create or update in Dynamics 365 Business Rules?
I still remember the excitement when Business Rules were introduced way back in CRM 2013. To be honest the scope was very limited at that time. The UI was nowhere close to what it is now. But one thing for sure, we all got the vision what business rule can be going forward.
Here I am in mid 2020. It’s been 7 years. Surprisingly some of the limitations that existed 7 years back exist now. And one of them is the eternal requirement to check whether the form type is Create or Update.
As of the time of writing this blog, there is no inbuilt parameter using which we can identify if FormMode is create or update. However there is an easy way out. If you think logically, all we need to check is if “createdon” field contains data.
And this condition will determine if the record is an existing record or new creation form.
Well well, the show is not over yet. While this works, you may find that even after setting up this condition, the business rule is not firing. If that is the case, then you have to remember the cardinal principle of Business Rules. The field used in the condition or action must be present on the form.
So make sure “Created On” field is on the form. If you don’t want to show it to the end-users, you can put it on the form and hide it.
Hope this helps!
(Business Solutions MVP)