Contains all the methods for calling the REST service with custom scripting
- Source:
Methods
-
.createViewFieldMappings(options)
-
Creates the view field mappings for each screen or grid.
Parameters:
Name Type Description optionsObject Specify the options for this method.
Properties
Name Type Description idstring Specify the id of the screen or grid.
viewFieldsObject Specify the view field collection.
- Source:
-
.executeMethod(options)
-
Calls the executeMethod endpoint of the REST call service for the given object and method. Request options can be passed as well. Request options that will be set by default
are CurrentUser, SourceSystem, SourceIdentifier and LocaleId.Parameters:
Name Type Description optionsObject Specify the options for this method.
Properties
Name Type Argument Description objectstring Specify the name of the object of the method to execute.
methodstring Specify the name of the method to execute.
profilestring Specify the profile to execute the method on.
requestOptionsObject <optional>
Specify the request options for this method.
Properties
Name Type Argument Description ContextObject <optional>
Specify the context records to send to the REST service. Can be an array.
RowKeysArray.<string> <optional>
Specify a unique identifier for each record of the Context property.
QueryOptionsObject <optional>
Specify the options for the query that prepares the view.
Properties
Name Type Argument Description FirstIteminteger <optional>
Specify the index of the first item that has to be fetched.
PageSizeInteger <optional>
Specify the amount of records to fetch.
ExpressionObject <optional>
Specify a filter object that is returned from the CSL.filter.parseFilterExpression method.
OrderByFieldsObject <optional>
Specify a sort object that is returned from the CSL.filter.parseSortExpression method.
- Source:
Throws:
Will throw an error if any required input field has not been set.
Returns:
A promise that is resolved when the call is successfully executed. If the call failed, the promise is rejected.
- Type
- Promise
-
.executeMultiRecord(options)
-
Calls the executeMultiRecord endpoint of the REST call service for the given object and multi record view. Request options can be passed as well. Request options that will be set by default
are CurrentUser, SourceSystem, SourceIdentifier and LocaleId.Parameters:
Name Type Description optionsObject Specify the options for this method.
Properties
Name Type Argument Description objectstring Specify the name of the object of the multi record view to execute.
viewstring Specify the name of the multi view to execute.
requestOptionsObject <optional>
Specify the request options for this method.
Properties
Name Type Argument Description ContextObject <optional>
Specify the context records to send to the REST service. Can be an array.
RowKeysArray.<string> <optional>
Specify a unique identifier for each record of the Context property.
QueryOptionsObject <optional>
Specify the options for the query that prepares the view.
Properties
Name Type Argument Description FirstIteminteger <optional>
Specify the index of the first item that has to be fetched.
PageSizeInteger <optional>
Specify the amount of records to fetch.
ExpressionObject <optional>
Specify a filter object that is returned from the CSL.filter.parseFilterExpression method.
OrderByFieldsObject <optional>
Specify a sort object that is returned from the CSL.filter.parseSortExpression method.
- Source:
Throws:
Will throw an error if any required input field has not been set.
Returns:
A promise that is resolved when the call is successfully executed. If the call failed, the promise is rejected.
- Type
- Promise
-
.executeView(options)
-
Calls the executeView endpoint of the REST call service for the given object and view. Request options can be passed as well. Request options that will be set by default
are CurrentUser, SourceSystem, SourceIdentifier and LocaleId.Parameters:
Name Type Description optionsObject Specify the options for this method.
Properties
Name Type Argument Description objectstring Specify the name of the object of the view to execute.
viewstring Specify the name of the view to execute.
requestOptionsObject <optional>
Specify the request options for this method.
Properties
Name Type Argument Description ContextObject <optional>
Specify the context records to send to the REST service. Can be an array.
RowKeysArray.<string> <optional>
Specify a unique identifier for each record of the Context property.
QueryOptionsObject <optional>
Specify the options for the query that prepares the view.
Properties
Name Type Argument Description FirstIteminteger <optional>
Specify the index of the first item that has to be fetched.
PageSizeInteger <optional>
Specify the amount of records to fetch.
ExpressionObject <optional>
Specify a filter object that is returned from the CSL.filter.parseFilterExpression method.
OrderByFieldsObject <optional>
Specify a sort object that is returned from the CSL.filter.parseSortExpression method.
- Source:
Throws:
Will throw an error if any required input field has not been set.
Returns:
A promise that is resolved when the call is successfully executed. If the call failed, the promise is rejected.
- Type
- Promise
-
.getFilterValues(options)
-
Calls the getFilterValues endpoint of the REST call service for the given object, view and view field. Request options can be passed as well. Request options that will be set by default
are CurrentUser, SourceSystem, SourceIdentifier and LocaleId.Parameters:
Name Type Description optionsObject Specify the options for this method.
Properties
Name Type Argument Description objectstring Specify the name of the object of the multi record view.
viewstring Specify the name of the multi record view to execute.
viewFieldNamestring Specify the name of the view field in the multi record view.
requestOptionsObject <optional>
Specify the request options for this method.
Properties
Name Type Argument Description ContextObject <optional>
Specify the context records to send to the REST service. Can be an array.
RowKeysArray.<string> <optional>
Specify a unique identifier for each record of the Context property.
QueryOptionsObject <optional>
Specify the options for the query that prepares the view.
Properties
Name Type Argument Description FirstIteminteger <optional>
Specify the index of the first item that has to be fetched.
PageSizeInteger <optional>
Specify the amount of records to fetch.
ExpressionObject <optional>
Specify a filter object that is returned from the CSL.filter.parseFilterExpression method.
OrderByFieldsObject <optional>
Specify a sort object that is returned from the CSL.filter.parseSortExpression method.
- Source:
Throws:
Will throw an error if any required input field has not been set.
Returns:
A promise that is resolved when the call is successfully executed. If the call failed, the promise is rejected.
- Type
- Promise
-
.getMethodFieldIdByViewFieldName(options)
-
Get the internal name (the client safe id) by the original view field name.
Parameters:
Name Type Description optionsObject Specify the options for this method.
Properties
Name Type Description idstring Specify the id of the screen or grid.
viewFieldNameString The original name of the view field.
- Source:
Returns:
The internal name (a guid which always begins with a letter).
- Type
- String
-
.getViewFieldDataSourceOutput(options)
-
Calls the getViewFieldDataSourceOutput endpoint of the REST call service for the given object and view. Request options can be passed as well. Request options that will be set by default
are CurrentUser, SourceSystem, SourceIdentifier and LocaleId. The output directories have to be specified in the requestOptions.Context property.Parameters:
Name Type Description optionsObject Specify the options for this method.
Properties
Name Type Description objectstring Specify the name of the object of the multi record view.
viewstring Specify the name of the multi record view to execute.
requestOptionsObject Specify the request options for this method.
Properties
Name Type Argument Description ContextObject Specify the context records to send to the REST service. Can be an array.
RowKeysArray.<string> <optional>
Specify a unique identifier for each record of the Context property.
QueryOptionsObject <optional>
Specify the options for the query that prepares the view.
Properties
Name Type Argument Description FirstIteminteger <optional>
Specify the index of the first item that has to be fetched.
PageSizeInteger <optional>
Specify the amount of records to fetch.
ExpressionObject <optional>
Specify a filter object that is returned from the CSL.filter.parseFilterExpression method.
OrderByFieldsObject <optional>
Specify a sort object that is returned from the CSL.filter.parseSortExpression method.
- Source:
Throws:
Will throw an error if any required input field has not been set.
Returns:
A promise that is resolved when the call is successfully executed. If the call failed, the promise is rejected.
- Type
- Promise
-
.getViewFieldInternalName(options)
-
Get the internal name (the client safe id) of the view field name.
Parameters:
Name Type Description optionsObject Specify the options for this method.
Properties
Name Type Description idstring Specify the id of the screen or grid.
viewFieldNameString The original name of the view field.
- Source:
Returns:
The internal name (a guid which always begins with a letter) of the view field.
- Type
- String
-
.getViewFieldInternalNameByMethodFieldId(options)
-
Get the internal name (the client safe id) of the view field for the given method output field.
Parameters:
Name Type Description optionsObject Specify the options for this method.
Properties
Name Type Description idstring Specify the id of the screen or grid.
methodFieldString The internal name of the method output field.
- Source:
Returns:
The internal name (a guid which always begins with a letter) of the corresponding view field.
- Type
- String
-
.getViewFieldNameByInternalName(options)
-
Get the original name of the view field internal name.
Parameters:
Name Type Description optionsObject Specify the options for this method.
Properties
Name Type Description idstring Specify the id of the screen or grid.
viewFieldInternalNameString The internal name of the view field.
- Source:
Returns:
The original name of the view field.
- Type
- String
-
.getViewFieldNameOfMethodField(options)
-
Returns the view field name of the given method output field
Parameters:
Name Type Description optionsObject Specify the options for this method.
Properties
Name Type Description idstring Specify the unique identifier of the screen or grid
methodFieldstring Specify the method output field
- Source:
Returns:
The name of the view field
- Type
- string
-
.prepareView(options)
-
Calls the prepareView endpoint of the REST call service for the given object and view. Request options can be passed as well. Request options that will be set by default
are CurrentUser, SourceSystem, SourceIdentifier and LocaleId.Parameters:
Name Type Description optionsObject Specify the options for this method.
Properties
Name Type Argument Description objectstring Specify the name of the object of the view to prepare.
viewstring Specify the name of the view to prepare.
requestOptionsObject <optional>
Specify the request options for this method.
Properties
Name Type Argument Description ContextObject <optional>
Specify the context records to send to the REST service. Can be an array.
RowKeysArray.<string> <optional>
Specify a unique identifier for each record of the Context property.
QueryOptionsObject <optional>
Specify the options for the query that prepares the view.
Properties
Name Type Argument Description FirstIteminteger <optional>
Specify the index of the first item that has to be fetched.
PageSizeInteger <optional>
Specify the amount of records to fetch.
ExpressionObject <optional>
Specify a filter object that is returned from the CSL.filter.parseFilterExpression method.
OrderByFieldsObject <optional>
Specify a sort object that is returned from the CSL.filter.parseSortExpression method.
- Source:
Throws:
Will throw an error if any required input field has not been set.
Returns:
A promise that is resolved when the call is successfully executed. If the call failed, the promise is rejected.
- Type
- Promise
-
.validateValue(options)
-
Calls the validateValue endpoint of the REST call service for the given object, view and validation values. Request options can be passed as well. Request options that will be set by default
are CurrentUser, SourceSystem, SourceIdentifier and LocaleId.Parameters:
Name Type Description optionsObject Specify the options for this method.
Properties
Name Type Description objectstring Specify the name of the object of the multi record view.
viewstring Specify the name of the multi record view to execute.
requestOptionsObject Specify the request options for this method.
Properties
Name Type Argument Description ValuesToValidateObject Specify the values to validate. The key is the name of the view field, the value an array of values to validate.
ContextObject <optional>
Specify the context records to send to the REST service. Can be an array.
RowKeysArray.<string> <optional>
Specify a unique identifier for each record of the Context property.
QueryOptionsObject <optional>
Specify the options for the query that prepares the view.
Properties
Name Type Argument Description FirstIteminteger <optional>
Specify the index of the first item that has to be fetched.
PageSizeInteger <optional>
Specify the amount of records to fetch.
ExpressionObject <optional>
Specify a filter object that is returned from the CSL.filter.parseFilterExpression method.
OrderByFieldsObject <optional>
Specify a sort object that is returned from the CSL.filter.parseSortExpression method.
- Source:
Throws:
Will throw an error if any required input field has not been set.
Returns:
A promise that is resolved when the call is successfully executed. If the call failed, the promise is rejected.
- Type
- Promise