Skip to main content

Adding and Exporting a Function

Functions you create are linked to named event rules or business functions on the JDE server. Once you create a function, you can load it to view and modify its data structure, where applicable.

Creating a Function

To create a function
  1. Open the Components menu group in the navigation panel.
  2. Select the Functions node. A list of available functions is displayed.

  3. Click the Add button in the top right corner. The Add Function screen is displayed.



  4. Enter a Name for the function that will be used to make the system calls. You can enter the exact name of the JDE method referenced, or create one that is more meaningful to you. The value for this field can be a maximum of 40 characters (no spaces). Valid characters include numbers, letters, underscore (_) and dash (-). 
  5. The JDE Function name refers to the JDE method within the business function or named event rule. Note that function names are case sensitive, so these must match exactly to JDE.
  6. Click the Load Function button in the top right of the screen to retrieve the function data structure from JDE. If you haven't logged into JDE yet, a login box will appear.
  7. The function parameters are displayed at the bottom of the screen.



  8. You can add Tags to your function to assist with management of component definitions. You can select from the existing tags or create a new tag. Valid characters include numbers, letters, dash and underscore. 
  9. Select the Applications that will use this function (to support application-based filtering).
  10. Enter the Component Version for this function.
  11. Description: A description of the service definition for reference
  12. You can secure the function to restrict which users can call it, by adding one or more JDE roles to the Roles field. The default role is *ALL which means any user can call the function.

  13. Each function parameter can be modified to suit your specific requirements. Refer to Defining a Function below for further details.
  14. Click the Save button.

Function Parameters

After loading the default definition of a function from JDE, you can then modify it as required. The following table lists the parameters that define the data structure for a function.

FieldDescription
Name

The name assigned to the method. By default, the system populates this field with the JDE Name. You can change the value to one that is more meaningful to you.

The value for this field can be a maximum of 30 characters (no spaces). Valid characters include numbers, letters, underscore (_) and dash (-).

JDE NameThe read-only name of the parameter, as defined in JDE.
Data Type

Data type for the parameter. The Cantara Access Server can determine the basic data types such as STRING, CHARACTER, and DATE, but is not able to automatically determine if the field is a complex data type such as ADDRESSNUMBER or BUSINESSUNIT unless it has been defined in the defaults definition file on the server. You can manually set these values to make sure the data sent to or returned from JDE is handled correctly and to enable the advanced lookup functionality. Refer to the Definition Data Types table for details about each of the data types.

InclusionUse this drop-down list to specify if the parameter is Required, Optional, or Hidden (locked field). Required fields must have a value supplied when the function is called. Optional fields may or may not have a value supplied and will use the default value if one is provided. Hidden fields will only use the default value provided and cannot be overridden when the function is called.
DirectionDetermines whether a parameter is passed In, Out, or Both of JDE when the function is called. This defaults to the same value as the setting in the JDE data structure.
LookupIf selected, the system executes the advanced lookup functionality for the data type specified. Refer to the Definition Data Types table for specific details about the lookup functionality for each of the data types.
DefaultYou can set a default value for a parameter. The default value for optional fields is submitted if no value is provided when the function is called. In the case of hidden fields, only the default value is submitted. The default value is ignored for fields that are required.


Exporting a Function

After a function has been saved, the definition can be exported to assist with Cantara Client integration. 

To export a function
  1. Open the Components menu group in the navigation panel.
  2. Select the Functions node. A list of available functions is displayed.
  3. Select the function to be exported.
  4. Select the Export button. A JSON-formatted definition file will be generated, which can be downloaded. For information about how this file is used in Canara Client, refer to Entity Generation (iOS) or Entity Generation (Android) depending on your client platform.


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.