Hi,
I am using workflow for purchase order approve. After approval completion process purchase lines allow edit is false. Now I want to apply same thing for purchase header. After approval completion process whole pruchase order should not be allowed for edit OR atleast right now I want lock purchase header for allow edit.
Please help!
You can control it using the workflow status field in PurchTable. Like if status is "Approved’ (Or) “Completed” then you make your PurchTable datasource to Non-editable : PurchTable_ds.AllowEdit(False) in Active method of purchtable datasource.
Hi,
In form purchtable → datasource → purchtable → methods = active, before return statement I have specified condition if purchtable.status = approved and purchtable.state = completed then purchtable_ds.allowedit(false). Still vendor account, invoice account, purch name is editable. Atleast I want to make these field non-editable.
if those fields are from purchtable then it should be non editable as u made it allowedit(false). moreover if you want to make other fields non-editable then got to design > control name and make there autodeclaration property to YES and then u can program this control as allowedit(false) in active method. or if those fields are coming from other table, just check and make that table_ds.allowedit(false);
can you try writing your code below this line in “Purchtable” active method
purchTableForm.setHeaderAccess();
in my ax function setHeaderAccess() is not present.
Hi,
In purchtable form I have made autodeclaration property yes to order account, invoice account and purch name column. In datasource → active method at the end ie before return statement I have give if condition
if (PurchTable.Status == Status::Approved &&
PurchTable.State ==State::Completed)
{
purchtable_ds.allowEdit(false);
PurchTable_OrderAccountAdv.allowEdit(false);
PurchTable_InvoiceAccountGrid.allowEdit(false);
PurchTable_PurchName1.allowEdit(false);
}
above nothing is working.