Dear Team,
I have created a Custom field (UsrContactPhone) on the Cases screen to display the Contact's phone number.
I used FieldSelecting Event to do this. The result displayed the value of Custom field (UsrContactPhone) on the Cases screen, but I can't re-enter another value for this field (UsrContactPhone). After entering another value again, the system updates the default value of FieldSelecting Event.
How can I change the value of the field after performing FieldSelecting Event or FieldUpdated Event ?
Please help me with the solution !
Best Regards,
NNT
==============
protected void CRCase_UsrContactPhone_FieldSelecting(PXCache cache, PXFieldSelectingEventArgs e, PXFieldSelecting InvokeBaseHandler)
{
if(InvokeBaseHandler != null)
InvokeBaseHandler(cache, e);
var row = (CRCase)e.Row;
if (row == null)
{
return;
}
Contact contact = PXSelect<Contact,
Where<Contact.contactID, Equal<Required<Contact.contactID>>>>.Select(Base, row.ContactID);
if (contact == null) { return; }
e.ReturnValue = contact.Phone1 ;
Base.Case.View.RequestRefresh();
}
==============