Creating a User Extension Field Value
  • 17 Oct 2024
  • 1 Minute to read
  • Dark
    Light

Creating a User Extension Field Value

  • Dark
    Light

Article summary

Introduction

User Extensions allow the functionality of the software to be extended through the creation of custom input fields. These input fields are attached to custom tables. The tables allow for storage and easy access of all miscellaneous information.

For example, if additional employee profile information needs to be stored like an employee’s driver license, a field can be custom defined under System > User Extension > Field Maintenance and added to the Employee Table.

This guide covers creating a value on a pre-defined User Extension Field.

Notice

UDF and UTF definitions must be setup and configured in CMiC web application prior to using the endpoints.

For a quick reference videos on creating and configuring UDFs and UETs,

Query a User Extension Definition (UDF)

To create values on an existing User Extension Field. First the definition of the field needs to be retrieved using the User Extension Definition endpoint.

In this example, we will be creating a value on the PYEMPLOYEE_TABLE, Driver License User Extension Field.

According to the User Extensions Table, the Driver License field is defined as ‘DRIVER_LCS’.
image.png

Using the Sdobjusrextdef endpoint, we will retrieve the ‘DRIVER_LCS’ column definition. The definition will be then be used to create a value against ‘DRIVER_LCS’.

https://{add CMiC domain}/{add CMiC server}/sys-rest-api/rest/1/sdobjusrextdef?finder=RowFinder; TableName=PYEMPLOYEE_TABLE

image.png

List of Object Types and Keys

In this case, the column is UedCode2.

We can also verify this through the CMiC web application, by going to US Payroll>Setup>Employee Profile looking up an employee record. Then enter your cursor on the field and select the ‘information’ indicator as shown below.
image.png

Creating a User Extension Field Value (UDF)

To create value under the DRIVER_LCS, we will use the POST action for Sdobjusrextvalue endpoint.

POST https://{add CMiC domain}/{add CMiC server}/sys-rest-api/rest/1/sdobjusrextvalue
{
    "UevUedSchemaName": "DA", 
    "UevUedTableName": "PYEMPLOYEE_TABLE", 
    "UevObjectKey1": "1407", 
    "UevCode2": "AW-1425-77888" 
}

Payload Definition:

AttributeDescription
UevUedSchemaNameStatic code 'DA'
UevUedTableNameEnter Object Type
UevObjectKey1Object Type Key 1, in this case employee #
UevObjectKey1Column Definition needs to be entered as attribute, followed by the value.

image.png

image.png