Skip to main content
Answer

Is it possible to override Release action in Fixed Asset Transaction screen

  • February 7, 2025
  • 1 reply
  • 63 views

Forum|alt.badge.img

Hi,

Is it possible to override release action in Fixed Asset Transaction screen? For now, the standard is can release if Transaction Amt >0 , but now i want to change the function so that it can release even though Transaction Amount = 0. Is it will effect others transaction?

 

Best answer by Ankita Tayana

Hi ​@wanizaidi27 

You can override release action using below code.

 

public class TransactionEntry_Extension : PXGraphExtension<PX.Objects.FA.TransactionEntry>
{
public delegate IEnumerable ReleaseDelegate(PXAdapter adapter);
[PXOverride]
public IEnumerable Release(PXAdapter adapter, ReleaseDelegate baseMethod)
{
foreach (FATran tran in Base.Transactions.Select())
{
if (tran.TranAmt == 0)
// Allow transactions with zero amount
{
PXTrace.WriteInformation($"Releasing transaction {tran.TranID} with zero amount.");
}
}
// Call the base release method
return baseMethod(adapter);
}
}

 

Hope it helps.

1 reply

Forum|alt.badge.img+5
  • Jr Varsity I
  • Answer
  • February 10, 2025

Hi ​@wanizaidi27 

You can override release action using below code.

 

public class TransactionEntry_Extension : PXGraphExtension<PX.Objects.FA.TransactionEntry>
{
public delegate IEnumerable ReleaseDelegate(PXAdapter adapter);
[PXOverride]
public IEnumerable Release(PXAdapter adapter, ReleaseDelegate baseMethod)
{
foreach (FATran tran in Base.Transactions.Select())
{
if (tran.TranAmt == 0)
// Allow transactions with zero amount
{
PXTrace.WriteInformation($"Releasing transaction {tran.TranID} with zero amount.");
}
}
// Call the base release method
return baseMethod(adapter);
}
}

 

Hope it helps.