I'm trying to override the UpdateCommandByGenerationMethod method in PIGenerator graph.
Acumatica gives a blank template as follows :
public delegate BqlCommandWithParameters UpdateCommandByGenerationMethodDelegate(BqlCommandWithParameters cmd);
[PXOverride]
public BqlCommandWithParameters UpdateCommandByGenerationMethod(BqlCommandWithParameters cmd, UpdateCommandByGenerationMethodDelegate baseMethod)
{
/* */
return baseMethod(cmd);
}
This will publish fine w/out error. But when I load the screen. I get an error :
Method PX.Objects.IN.PhysicalInventory.BqlCommandWithParameters UpdateCommandByGenerationMethodTSiteIdField,TInventoryIdField,TSubItemIdField,TLocationIdField is a generic method definition
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Method PX.Objects.IN.PhysicalInventory.BqlCommandWithParameters UpdateCommandByGenerationMethodTSiteIdField,TInventoryIdField,TSubItemIdField,TLocationIdField is a generic method definition
The actual method signature in Acumatica is as follow :
protected virtual BqlCommandWithParameters UpdateCommandByGenerationMethod<TSiteIdField, TInventoryIdField, TSubItemIdField, TLocationIdField>(
BqlCommandWithParameters cmd)
where TSiteIdField : IBqlOperand
where TInventoryIdField : IBqlField
where TSubItemIdField : IBqlField
where TLocationIdField : IBqlField
{
...
}
So how do I fix the declaration of the delegate method ?
Thanks in advance.