Changing the currentvalue of an EntityField2 Does not dirty the entity?

Posts   
 
    
BaileyK83
User
Posts: 29
Joined: 30-Dec-2006
# Posted on: 10-Apr-2008 01:45:02   

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.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 10-Apr-2008 06:28:18   

You should use _SetNewFieldValue _entity's method:

order.SetNewFieldValue((int)OrderFieldIndex.ShippingDate, null);
David Elizondo | LLBLGen Support Team
BaileyK83
User
Posts: 29
Joined: 30-Dec-2006
# Posted on: 10-Apr-2008 06:39:03   

Is there anyway to do it without having the Entity? Do the fields hold a reference to the entity somewhere?

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 10-Apr-2008 11:38:27   

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?