I have managed to add two custom fields to the Line details (Time and Material) of the pro forma screen.
We need them to be editable once the status is closed, but in doing so using code, all the fields are editable which is a bit dangerous as the invoice is already released.
I then checked the workflow and it has no setting for disabling all the Pro Forma Line line (All Fields) in the Closed Status. I thought, lets add it. Still all are editable.
Really need to stop all the other fields from being editable so hoping for some help here.
My code:
public class ProformaEntry_Extension : PXGraphExtension<PX.Objects.PM.ProformaEntry>
{
#region Event Handlers
protected void PMProformaTransactLine_RowSelected(PXCache cache, PXRowSelectedEventArgs e)
{
var row = (PMProformaTransactLine)e.Row;
if (row == null) return;
cache.AllowUpdate = true;
PXUIFieldAttribute.SetEnabled(cache, row, true);
PXUIFieldAttribute.SetEnabled<PMProformaLineExt.usrMAnoteID>(cache, row, true);
PXUIFieldAttribute.SetEnabled<PMProformaLineExt.usrMAflag>(cache, row, true);