Solved

How to duplicate an existing screen (Customer Contracts) to a new screen (Vendor Contracts)

  • 6 July 2021
  • 4 replies
  • 396 views

Good Day,

This is my first time to post here in the site, please bear with me. :)

One of the requirements of our project is to duplicate an existing screen (Customer Contracts) into a new screen (Vendor Contracts) imitating the existing screen. I already saw one approach that the asp files can be copied and renamed but that is possible only for the ASP files.

  1. Could this be possible?
  2. If so, are there other things to consider (graphs, DACs of the existing screen to be duplicated as well?)
  3. Are there other ways to achieve this?

I'm still new to acumatica btw. Any responses are very much appreciated.

Thanks and stay safe.

icon

Best answer by Hughes Beausejour 6 July 2021, 16:32

View original

4 replies

Userlevel 7
Badge +17

Hi @jesusetable50   Welcome to community :)

You can find the solution of your question here and let me know if you have any further queries

Userlevel 5
Badge +2

If it’s a perfect copy you can use the same graph.

If not you can create a new graph class that inherits from the original to extend it:
public class NewGraph : ExistingGraph
{

}

In ASPX file you will need to change TypeName property of PXDataSource element to reference the new graph:
<px:PXDataSource ID="ds" runat="server" PrimaryView="Document" TypeName="MyNamespace.NewGraph">

For DAC you can extend them with a DAC extension:
public class DacExtension : PXCacheExtension<DAC>
{

}

And you can use CacheAttached mechanism to redefine DAC field only for the target graph:

public class NewGraph : ExistingGraph
{

         // Change DAC field label only for the target graph
        [PXMergeAttributes(Method = MergeMethod.Merge)]
        [PXUIField(DisplayName = "My Display Name")]
        protected virtual void NotificationRecipient_Email_CacheAttached(PXCache sender)
        {
        }

}
 

Userlevel 2
Badge

Hello,

I am trying to do what you were asking, copy the Customer Contracts over to Vendor Contracts. I think a lot of Customers will need this feature as I did in the past. I got the files copied over and the site map setup. It looks like a perfect copy. When I go into customize, I am getting an error from the test environment that is reverting back to the original aspx file. I did not make any changes to the aspx file, is this my problem? I am going to want the page to pull information from the vendors and not the customers, can you please help direct me to complete this task? CT301000 is the original screen I copied from. Also, when I copy over the pages in the server, do I put the new copies in the page folder of the workspace I want it in, like the AP folder or leave it in the CT folder? Currently, I left them in the CT folder and mapped the site map to there or does it not matter?

 

Thank you,

Barbie Jeter

Userlevel 2
Badge

If it’s a perfect copy you can use the same graph.

If not you can create a new graph class that inherits from the original to extend it:
public class NewGraph : ExistingGraph
{

}

In ASPX file you will need to change TypeName property of PXDataSource element to reference the new graph:
<px:PXDataSource ID="ds" runat="server" PrimaryView="Document" TypeName="MyNamespace.NewGraph">

For DAC you can extend them with a DAC extension:
public class DacExtension : PXCacheExtension<DAC>
{

}

And you can use CacheAttached mechanism to redefine DAC field only for the target graph:

public class NewGraph : ExistingGraph
{

         // Change DAC field label only for the target graph
        [PXMergeAttributes(Method = MergeMethod.Merge)]
        [PXUIField(DisplayName = "My Display Name")]
        protected virtual void NotificationRecipient_Email_CacheAttached(PXCache sender)
        {
        }

}
 

 All my Actions and workflow missing if i do custom Graph with inherit Existing screen graph.  Any solutions for this 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