How to set field editable on PurchReqTable Form

Hello, everyone

I want to set the (PurchReqLine).Name field editable when the (PurchReqTable).RequisitionStatus is ‘InReview’.

I add belows to DataSources.PurchReqLine.active(), but it did not work.

if(purchReqTable.RequisitionStatus == PurchReqRequisitionStatus::InReview)
{
Item_Name.allowEdit(true);
}

Thanks in advance

There is already a code to enable/disable this for edit, look at the setfieldAccess method in the form.

Thanks for your respons, and I found a code to set all of datasource tables disable for edit.

So I will try to create a button to open a new simple form to edit the itemname field.

Best Regards