For the managed package runtime, you must define the metadata required for a custom function in Salesforce.
This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.
In release Vlocity Health and Insurance Spring '21 or later, you don't need to perform this task. Just use the FUNCTION function. See Function Reference (Managed Package).
- Go to Setup.
- In the Quick Find box, enter custom.
- Click Custom Metadata Types.
- Click Function Definition.
- Click Manage Function Definitions.
- Click New.
-
Specify settings as follows:
-
Label: The function name displayed in the list on the Function Definitions tab.
-
Function Definition Name: The unique function name used by the API and managed packages, and which you use in formulas. The name must begin with a letter and use only alphanumeric characters and underscores. The name cannot end with an underscore or have two consecutive underscores.
-
ClassName: The Apex class containing the method that implements the logic for the function.
-
Method Name: The method that implements the logic for the function.
-
- To support the Apex code in the example above, you must add two function definitions with the following settings:
- Click Save.