Question

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

  • 6 July 2021
  • 2 replies
  • 34 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.


2 replies

Userlevel 6
Badge +9

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 4

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)
        {
        }

}
 

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 — 2020  Acumatica, Inc. All rights reserved