DEV Community

Tech Community for Software AG Tech Community

Posted on • Originally published at tech.forums.softwareag.com on

RECORD CLONING AS A FEATURE USING AGILEAPPS JAVA API's

RECORD CLONING AS A FEATURE USING AGILEAPPS JAVA API's

Record Cloning is used to replicate or duplicate a certain record. All the data within a record is replicated into a new record with a new record number. Using this feature, you can create similar records multiple times with minimal data changed in certain fields. This way, the rest of the data remains intact and only the fields that need to be updated are changed in the new record.

You can use this feature generally or specifically.

  1. When used _ generally _, a record in an object is cloned with the rest of the data. The object is independent of other objects, and there is no relationship established with the other objects.
  2. When used _ specifically _, a record in an object is cloned with the rest of the data including the related information and the sub-forms. The object is dependent on other objects, and there is relationship established with the other objects.

Record Cloning is done using a piece of Java code. This Java code provides the functionality using AgileApps macros.

Creating the functionality :

  1. Write the code in the CLASS section of the developer resources tab.
  2. You can find the CLASS section under: Configuration → Customization → Developer Resources → Classes

Executing the functionality :

Use the MACROS feature of AgileApps which allows you to create a dropdown feature in the record view section.

Configuring the macros :

Configuration → Customization → Objects → {object} → Macros → New Macro

  1. Name the macros
  2. Provide a description, if required,
  3. Select unconditionally for a condition
  4. Under actions → Select Invoke Method and Invoke the class and respective method

You can find a general code for record cloning in the original article in the Software AG Tech Community.

Discussion (0)