Skip to main content
Solved

SOOrderEntry Release From Risk Hold

  • November 19, 2024
  • 1 reply
  • 33 views

Forum|alt.badge.img

I am sure this is a basic question, but I need to add some steps when releasing from Risk Hold.

I copied my Release From Hold commands and changed it to ReleaseFromRiskHold.  Visual Studio Acuminator message:  The signature of a method with the PXOverride attribute must match the override method.

I went into the Customization Project Code to have the system create the extension code for me.  I did not find ReleaseFromRiskHold as an option.  

 

Code:

public delegate IEnumerable ReleaseFromRiskHoldDelegate(PXAdapter adapter);
[PXOverride()]
public IEnumerable ReleaseFromRiskHold(PXAdapter adapter, ReleaseFromRiskHoldDelegate BaseMethod)
{
    // my code here
    return BaseMethod.Invoke(adapter);
}

Thank-you.

Best answer by darylbowman

Try this:

// Acuminator disable once PX1016 ExtensionDoesNotDeclareIsActiveMethod extension should be constantly active
public class CustomRiskHoldWorkflowExt : PXGraphExtension<BCSOOrderEntryExt.SOOrderEntry_RiskWorkflow, SOOrderEntry_ApprovalWorkflow, SOOrderEntry_Workflow, SOOrderEntry>
{
	public delegate IEnumerable RemoveRiskHoldDelegate(PXAdapter adapter);
	[PXOverride]
    public virtual IEnumerable RemoveRiskHold(PXAdapter adapter, RemoveRiskHoldDelegate baseMethod)
	{
		return baseMethod(adapter);
	}
}

The original RemoveRiskHold action is in the BCSOOrderEntryExt class of PX.Commerce.Objects\BC\Extensions\SOOrderEntryExt.cs

View original
Did this topic help you find an answer to your question?

1 reply

darylbowman
Captain II
Forum|alt.badge.img+13
  • 1713 replies
  • Answer
  • November 20, 2024

Try this:

// Acuminator disable once PX1016 ExtensionDoesNotDeclareIsActiveMethod extension should be constantly active
public class CustomRiskHoldWorkflowExt : PXGraphExtension<BCSOOrderEntryExt.SOOrderEntry_RiskWorkflow, SOOrderEntry_ApprovalWorkflow, SOOrderEntry_Workflow, SOOrderEntry>
{
	public delegate IEnumerable RemoveRiskHoldDelegate(PXAdapter adapter);
	[PXOverride]
    public virtual IEnumerable RemoveRiskHold(PXAdapter adapter, RemoveRiskHoldDelegate baseMethod)
	{
		return baseMethod(adapter);
	}
}

The original RemoveRiskHold action is in the BCSOOrderEntryExt class of PX.Commerce.Objects\BC\Extensions\SOOrderEntryExt.cs


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