Skip to main content
Answer

Error when trying to extended workflow via code extension

  • August 21, 2024
  • 2 replies
  • 73 views

Forum|alt.badge.img+7

I’m playing around with extending workflows. In this case I’ve added an Action to SOOrderEntry in my graph extension. I’ve created a workflow extension as well. While my code compiles, I get an error displayed on the login screen:

When extending a cache, cross references are not permitted: CustomerOEMods.Workflow.SOOrderEntry_Workflow -> CustomerOEMods.Workflow.SOOrderEntry_Workflow.

 

The class definition for my workflow class is as follows:

public class SOOrderEntry_Workflow : PXGraphExtension<SOOrderEntry_Workflow, SOOrderEntry>

{

}

The definition of my graph extension of SOOrderEntry is:

public class SOOrderEntry_Extension : PXGraphExtension<PX.Objects.SO.SOOrderEntry>

{

}

Are these definitions incorrect? I’m following T270 as it covers adding an action to the SOInvoiceEntry workflow.

I’m not sure what I’m missing.

Best answer by darylbowman

I believe because you’re naming your version identically to the original, it’s getting confused with itself. You could either rename your version or fully qualify the original graph extension:

using SO = PX.Objects.SO;

public class SOOrderEntry_Workflow : PXGraphExtension<SO.SOOrderEntry_Workflow, SOOrderEntry>
{

}

 

2 replies

darylbowman
Captain II
Forum|alt.badge.img+15
  • Answer
  • August 21, 2024

I believe because you’re naming your version identically to the original, it’s getting confused with itself. You could either rename your version or fully qualify the original graph extension:

using SO = PX.Objects.SO;

public class SOOrderEntry_Workflow : PXGraphExtension<SO.SOOrderEntry_Workflow, SOOrderEntry>
{

}

 


Forum|alt.badge.img+7
  • Author
  • Captain II
  • August 21, 2024

Thank you! I figured it was a C# thing vs a framework thing. I just wasn’t sure how to get out of the circular naming loop.