I have a webform that pulls in values from CRM (D365) On-Premise. When the form is saved, there is a date field, that even when I do not assign a value, the onchange event is fired in CRM, which in my case, fires a workflow.
If _Entity.DateField Is Nothing And Me.txtDate.Text <> "" Then _Entity.DateField = Me.txtDate.Text ElseIf _Entity.DateField IsNot Nothing Then If _SWTCommon.Field(_Entity.DateField, " ", 1) <> Me.txtDate.Text Then _Entity.DateField = Me.txtDate.Text End If End If
The _SWTCommon.Field function formats the date time string as date only. I use the same function to fill the textbox when the web form loads. I've stepped through and seen that no value gets assigned to _Entity.DateField, but the workflow that is triggered by the onchange is still fired.
*This post is locked for comments