Hi All,
I need to add a condition to release from hold to unhold event. Based on the condition need to block transferring to unhold status.
Can someone help me to achieve this?

Thanks
Bhagya
Hi All,
I need to add a condition to release from hold to unhold event. Based on the condition need to block transferring to unhold status.
Can someone help me to achieve this?

Thanks
Bhagya
Best answer by Vignesh Ponnusamy
Hi
From the RowSelected event you can try something like below,
protected void APPayment_RowSelected(PXCache cache, PXRowSelectedEventArgs e, PXRowSelected baseHandler)
{
baseHandler?.Invoke(cache, e);
var row = (APPayment)e.Row;
if (row.DocDesc == "Test")
{
Base.releaseFromHold.SetEnabled(false);
PXUIFieldAttribute.SetWarning<APPayment.docDesc>(Base.Document.Cache, row, "Description is Test");
}
}To set the warning you can use PXUIFieldAttribute.SetWarning for a specific field to set the warning.
Also, set CommitChange for the field to true to enable backend call when the field is updated,

Good Luck.!
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.