How can I change the value of an EntityField2 Directly and have the entity be marked as dirty?
Dim lObj As Object = Convert.ChangeType(lControl.Text, lEntityField.DataType) lEntityField.CurrentValue = lObj
This does not mark the entity as dirty.
You should use _SetNewFieldValue _entity's method:
order.SetNewFieldValue((int)OrderFieldIndex.ShippingDate, null);
Is there anyway to do it without having the Entity? Do the fields hold a reference to the entity somewhere?
Is there anyway to do it without having the Entity?
As far as I know no.
Do the fields hold a reference to the entity somewhere?
no.
May I ask why do you need it this way?