Skip to main content

Custom objects

Description

The custom objects are the objects created by the administrator to extend the Soffid underlying data model. This allows you to store additional information that is not natively supported by Soffid. 

This option allows administrator users to provide objects with content.

For more information about how to  create a new Custom object you can visit the Metadata page.

Screen overview

image.png

image.png

image.png

In the metadata page:

image.png

image.png

  • Metadata : where the custom object is configured

Standard attributes

Attributes by default:

  • Name: identification name.
  • Description: brief description.

Every single custom object could have specified attributes defined by the administrator users when they create the object type in the Metadata page.

Actions

Custom object query

"Query"

Allows you to query custom object through different search systems, Quick, Basic and Advanced.

Add new

Allows you to create a new custom object. You can choose that option on the hamburger menu or clicking the add button (+).

To add a new custom object it will be mandatory to fill in the required fields

Delete custom object

Allows you to remove one or more custom objects by selecting one or more records and next clicking the button with the subtraction symbol (-).

To perform that action, Soffid will ask you for confirmation, you could confirm or cancel the operation.

Download CSV file

Allows you to download a csv file with the custom objects information.

Import

Allows you to upload a CSV file with the custom object list to add or update custom objects to Soffid.

First, you need to pick up a CSV file, that CSV has to contain a specific configuration. Then you need to check the content to be loaded, it is allowed to choose if you want or not to load a specific attribute. And finally, you need to select the mappings for each column of the CSV file to import the data correctly and to click the Import button.

View

Allows you to add or remove columns to the table.

It is also possible to change the order of the columns.

Custom object detail

Apply changes

Allows you to save the data of a new custom object or to update the data of a specific custom object. To save the data it will be mandatory to fill in the required fields

Delete custom object

Allows you to remove a custom object.  You can choose that option on the trash icon.

To perform that action, Soffid will ask you for confirmation, you could confirm or cancel the operation.

Undo

Allows you to undo  any changes made

Examples

How to use custom objects in the scripts

Example 1: Retrieve the list of the records of the custom object Country.

lCusObj = serviceLocator.getCustomObjectService().findCustomObjectNames("Country");

Example 2: Retrieve a custom object value by name of the custom object Country.

cusObj = serviceLocator.getCustomObjectService().findCustomObjectByTypeAndName("Country","ES");

Example 3: List the values of the custom object Country that the name starts with "A".

lCusObj = serviceLocator.getCustomObjectService().findCustomObjectByJsonQuery("Country", "name sw " + "\"A\"");
for (var i=0; i<lCusObj.length; i++) {
  atributes = lCustomObj[i].getAttributes();
  out.println("*** Custom Object - " + i + " - " + lCusObj[i].name);
}