I need to update value of a record in DevExpress XAF, from a custom form, if Oid of a record matches the input I am getting from a textbox.
I have tried using UnitofWork by the following code, but it doesn't work:
UnitOfWork uow = new UnitOfWork();
CriteriaOperator op = CriteriaOperator.Parse("Oid = ?", ReceivedTextBox.Text);
Bilty bilty = uow.FindObject<Bilty>(op);
if (bilty == null) return;
bilty.Received = true;
uow.CommitChanges();
Can someone tell me what I am doing wrong here? I have tried searching for the solution on official DevExpress forum but this is the best I could reach.