Mandatory properties catalog


It’s possible to define mandatory property catalogs for a product. These properties impact the computing of the product advancement score when they are not filled.


The catalog can also be directly downloaded to the instance by going to:

Repository> System> Properties catalog

  • id: string, the unique catalog identifier (e.g. "inco");
  • label: string, the catalog name displayed (e.g. "EU 1169/2011 (INCO)");
  • entityType: table, if this catalog is applied for a specific entity type (e.g. ['bcpg:finishedProduct'] will apply this catalog only on finished products). Optional field;
  • fields: table, the list of fields that have to be filled in order to validate the entity (e.g. ["bcpg:legalName", "bcpg:storageConditionsRef"] will create a catalog where the legal name and the packaging conditions must be filled);
  • i18nMessages: Object, the mapping of fields and their labels. In the situation where certain fields are overloaded in forms, we need to use the new renamed fields values. e.g. {"bcpg:clients":"business partner", "cm:title": "becpg.forms.field.tradeName"}
    • For bcpg:client we now use the label business partner.
    • For cm:title we use a language key, that language key must be declared in a file that resides in Core(Alfresco).
  • locals: table, the languages list for which the catalog is applied. It’s used for the multilingual fields, which must be filled in all languages in common with these indicated in the catalog through this field, and these which are selected in the reports parameters. If this field doesn’t exist, reports languages will be chosen (if there are), otherwise the system language will be the one selected. A language is defined by a 2 letters code according to the ISO-639-1 regulation.

https://fr.wikipedia.org/wiki/Liste\_des\_codes\_ISO\_639-1 Champ optionnel

Concerning the multilingual fields, it’s possible to force a field in a certain language. In that case, the field must be followed by a souligner and the language, for example becpg:legalName_pl forces the filling of the legal name in polish, whatever the language chosen in the catalog or the reports.

See below for some examples of catalogs:

 [
    {
        "id": "incoFinishedProduct",
        "label": "EU 1169/2011 (INCO)",
        "entityType": [
            "bcpg:finishedProduct"
        ],
        "uniqueFields": [
            "bcpg:erpCode",
            "cm:name"
        ],
        "fields": [
            "bcpg:legalName",
            "bcpg:precautionOfUseRef",
            "bcpg:useByDate|bcpg:bestBeforeDate",
            "bcpg:storageConditionsRef",
            "cm:title"
        ]
    },
    {
        "id": "incoRawMaterials",
        "label": "EU1169/2011 (INCO)",
        "entityType": [
            "bcpg:rawMaterial"
        ],
        "uniqueFields": [
            "bcpg:erpCode",
            "cm:name"
        ],
        "fields": [
            "bcpg:legalName"
        ]
    }
]

The backslash at the end of a line allows the property to continue to the next line.

It’s recommended to verify the JSON table validity (without back slash) thanks to a parser before starting the instance - http://json.parser.online.fr/

N.B : You need to clear cache when you update the catalog file.

Easy way to add/delete a field in the catalog:

  1. Go to Repository>System>Properties catalog;
  2. Put the cursor on "Catalogs" and press "Download";
  3. Open the file with a text editor (Atom for example);
  4. Add or delete a line;
  5. Add or delete a line;
  6. Return to the instance and press "More" and then "Import a new version" and choose the file which has just been modified.

results matching ""

    No results matching ""