Package com.saperion.ngc.scripthelper
Class ScriptHelper
java.lang.Object
com.saperion.ngc.scripthelper.ScriptHelper
Provides static helper methods to be used in server-side scripts in masks.
- 
Method SummaryModifier and TypeMethodDescriptionstatic com.saperion.connector.SaClassicConnectorProvides an instance of theSaClassicConnector.static UserProvides the current logged in user object.static IntelligentFieldgetFieldByName(IntelligentFormView form, String name) Returns the field with the specified name or null, if no field was found.static voidLogs a debug-message in the logfile.static voidLogs an error-message in the logfile.static voidLogs an info-message in the logfile.static voidlogWarning(String message) Logs a warning-message in the logfile.static List<com.saperion.intf.SaDocumentInfo>performQuery(String query) Performs a query against the classic Connector.static voidPosts a query event (onButton-event of type ON_QUERY) to the given form.static voidshowErrorMessage(String error) Shows an error message box with the given message to the user.static voidshowInfoMessage(String message) Shows an info message box with the given message to the user.
- 
Method Details- 
getFieldByNameReturns the field with the specified name or null, if no field was found.- Parameters:
- form- parent form
- name- field name
- Returns:
- field or null if not found
 
- 
postQueryEventPosts a query event (onButton-event of type ON_QUERY) to the given form.- Parameters:
- form- The IntelligentFormView the event should be post to.
 
- 
getCurrentUserProvides the current logged in user object.- Returns:
 
- 
getClassicConnectorpublic static com.saperion.connector.SaClassicConnector getClassicConnector()Provides an instance of theSaClassicConnector.- Returns:
- an instance of the SaClassicConnector.
 
- 
performQueryPerforms a query against the classic Connector.- Parameters:
- query-
- Returns:
 
- 
showInfoMessageShows an info message box with the given message to the user.- Parameters:
- message- The message to show.
 
- 
showErrorMessageShows an error message box with the given message to the user.- Parameters:
- error- The message to show.
 
- 
logErrorLogs an error-message in the logfile.- Parameters:
- message- the message
 
- 
logWarningLogs a warning-message in the logfile.- Parameters:
- message- the message
 
- 
logInfoLogs an info-message in the logfile.- Parameters:
- message- the message
 
- 
logDebugLogs a debug-message in the logfile.- Parameters:
- message- the message
 
 
-