NexJ Logo

Generating JSON-formatted NexJ CRM metadata details

As of Data Bridge 3.2.0, you can run a Scheme script to generate JSON-formatted NexJ CRM metadata details information. The script contains a collection of CRM metaclass names and, when run, provides the CRM metadata details as .json files.

To generate the CRM metadata:

  1. In NexJ Studio, select the model that has dataengine as a project mixin.
  2. Select the NexJ Studio perspective and select the Resources application layer in the Model Navigator.
  3. Select the Scratchpads tab and open the DataEngineModelGenerator.scm file.
  4. Specify the output directory in the script by editing the script and setting the outPutDir variable to a valid location on the file system. For example:
    (define outPutDir "C:\\Users\\user.name\\Desktop\\exportJson")
  5. Optional: Add any classes that you have created that don't currently exist in NexJ CRM. This can be done using:
    (hashset-add! classSet "AdditionalCRMClassName")
  6. Save your changes to the script.
  7. Run the script in NexJ Studio against the NexJ CRM instance in the Scheme Console.

The .json files containing the necessary CRM metadata are generated in the output directory that you specified.

To load the .json files, choose one of the following methods:

  • If you are using a generated JSON model that is different from the out-of-the-box model, set the dng.model.location flag in the environment file to the output directory, which loads the .json files from the directory.
  • If you are using the out-of-the-box model, leave the dng.model.location flag blank, which loads the .json files from the out-of-the-box model.

If your project is setting up a replicated database and cluster for NexJ CRM, the script should be run against the replicated CRM model.