Solved

Error when publish project

  • 29 August 2023
  • 4 replies
  • 65 views

Userlevel 3
Badge
The Void ReleaseDocProc(PX.Objects.GL.JournalEntry, PX.Objects.IN.INRegister, ReleaseDocProcDelegate) method in the PX.Objects.IN.INReleaseProcess_Extension graph extension is marked as [PXOverride], but its signature is not compatible with the original method.
icon

Best answer by jinin 30 August 2023, 08:27

View original

4 replies

Userlevel 7
Badge +10

Hi @kevinheng21 ,

I think there might be a discrepancy in the parameters you've provided in the override method.

public class APReleaseProcess_Extension : PXGraphExtension<PX.Objects.AP.APReleaseProcess>
{

public delegate List<APRegister> ReleaseDocProcDelegate(JournalEntry je, APRegister doc, Boolean isPrebooking, ref List<INRegister> inDocs);
[PXOverride]
public List<APRegister> ReleaseDocProc(JournalEntry je, APRegister doc, Boolean isPrebooking, ref List<INRegister> inDocs, ReleaseDocProcDelegate baseMethod)
{
var value = baseMethod(je,doc,isPrebooking,ref inDocs);
return value;
}

}

Could you please try above code and publish?

Regards,

Sweta

Userlevel 3
Badge

here is my code in INReleaseProcess_Extension, it doesn’t relate to APRegister

public delegate void ReleaseDocProcDelegate(JournalEntry je, INRegister doc);

      [PXOverride]
    public void ReleaseDocProc(
      JournalEntry je,
      INRegister doc,
      INReleaseProcess_Extension.ReleaseDocProcDelegate baseMethod)
    {

…...

}

 

Userlevel 7
Badge +10

Hi @kevinheng21 ,

I tried it in my local instance and customization project got published successfully.

 public class INReleaseProcess_Extension : PXGraphExtension<PX.Objects.IN.INReleaseProcess>
{
#region Event Handlers
public delegate void ReleaseDocProcDelegate(JournalEntry je, INRegister doc);
[PXOverride]
public void ReleaseDocProc(JournalEntry je, INRegister doc, ReleaseDocProcDelegate baseMethod)
{
baseMethod(je,doc);
}

 

Userlevel 7
Badge +11

Hi @kevinheng21 ,

I’ve reviewed the same in my local and am not facing any error. 

 public class INReleaseProcessExtension : PXGraphExtension<INReleaseProcess>
  {

    [PXOverride]
     public delegate void ReleaseDocProcDelegate(JournalEntry je, INRegister doc);
          public virtual void ReleaseDocProc(JournalEntry je, INRegister doc, ReleaseDocProcDelegate baseMethod)
     {
           
     }
  }

Try with the sample code and let me know if still facing the same issue.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved