Skip to main content
Question

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

  • February 7, 2025
  • 1 reply
  • 29 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?

 

1 reply

Forum|alt.badge.img
  • Jr Varsity I
  • 71 replies
  • 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.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings