Requirement: Execute business rule only on create of entity record.
Solution: As we know that business rules are executed on form load and on change of the associated field, which means if we have business rule for any entity it will fire for new record as well for existing records when form will load.
If you are new to business rule, you can refer our earlier articles for business rules
Let see this by example, consider we have one business rule in account entity which checks if industry field is blank, if yes, it will set it’s value to consulting. Let’s say we have following business rule for account entity which is activated.
Now if we will try to create a new account record, our business rule will fire and we can see industry field is populated like following:
Similarly if we will open any existing record where industry field is blank it will populate industry field on form load, for example following record have industry field as blank
Now if we will open this record, industry field will be populated by our business rule like following:
Now to avoid our business rule running on existing record, we can simply apply a workaround here and can put a condition to set value only if createdon field does not contains any data, this way our business rule will only rule for new entity records 🙂
Hope it will help someone !!
Pingback: Running business rule only on record create - Microsoft Dynamics CRM Community