Class: nlobjAssistant

nlobjAssistant

new nlobjAssistant() → {nlobjAssistant}

Return a new instance of nlobjAssistant.
Since:
  • 2009.2
Source:
Returns:
Type
nlobjAssistant

Methods

addField(name, type, label, source, group) → {nlobjField}

add a field to this page and return it.
Parameters:
Name Type Argument Description
name string field name
type string field type
label string <optional>
field label
source string, int <optional>
script ID or internal ID for source list (select and multiselects only) -or- radio value for radio fields
group string <optional>
group name that this field will live on. If empty then the field is added to the main section of the page
Since:
  • 2009.2
Source:
Returns:
Type
nlobjField

addFieldGroup(name, label) → {nlobjFieldGroup}

add a field group to the page.
Parameters:
Name Type Description
name string field group name
label string field group label
Since:
  • 2009.2
Source:
Returns:
Type
nlobjFieldGroup

addStep(name, label) → {nlobjAssistantStep}

add a step to the assistant.
Parameters:
Name Type Description
name string the name of the step
label string label used for this step
Since:
  • 2009.2
Source:
Returns:
Type
nlobjAssistantStep

addSubList(name, type, label) → {nlobjSubList}

add a sublist to this page and return it. For now only sublists of type inlineeditor are supported
Parameters:
Name Type Description
name string sublist name
type string sublist type (inlineeditor only for now)
label string sublist label
Since:
  • 2009.2
Source:
Returns:
Type
nlobjSubList

getAllFieldGroups() → {string[]}

return an array of the names of all field groups on this page.
Since:
  • 2009.2
Source:
Returns:
Type
string[]

getAllFields() → {string[]}

return an array of the names of all fields on this page.
Since:
  • 2009.2
Source:
Returns:
Type
string[]

getAllSteps() → {nlobjAssistantStep[]}

return an array of all the assistant steps for this assistant.
Since:
  • 2009.2
Source:
Returns:
Type
nlobjAssistantStep[]

getAllSubLists() → {string[]}

return an array of the names of all sublists on this page .
Since:
  • 2009.2
Source:
Returns:
Type
string[]

getCurrentStep() → {nlobjAssistantStep}

return current step set via nlobjAssistant.setCurrentStep(step)
Since:
  • 2009.2
Source:
Returns:
Type
nlobjAssistantStep

getField(name) → {nlobjField}

return a field on this page.
Parameters:
Name Type Description
name string field name
Since:
  • 2009.2
Source:
Returns:
Type
nlobjField

getFieldGroup(name) → {nlobjFieldGroup}

return a field group on this page.
Parameters:
Name Type Description
name string field group name
Since:
  • 2009.2
Source:
Returns:
Type
nlobjFieldGroup

getLastAction() → {string}

return the last submitted action by the user: next|back|cancel|finish|jump
Since:
  • 2009.2
Source:
Returns:
Type
string

getLastStep() → {nlobjAssistantStep}

return step from which the last submitted action came from
Since:
  • 2009.2
Source:
Returns:
Type
nlobjAssistantStep

getNextStep() → {nlobjAssistantStep}

return the next logical step corresponding to the user's last submitted action. You should only call this after you have successfully captured all the information from the last step and are ready to move on to the next step. You would use the return value to set the current step prior to continuing.
Since:
  • 2009.2
Source:
Returns:
Type
nlobjAssistantStep

getStep(name) → {nlobjAssistantStep}

return an assistant step on this page.
Parameters:
Name Type Description
name string step name
Since:
  • 2009.2
Source:
Returns:
Type
nlobjAssistantStep

getStepCount() → {int}

return the total number of steps in the assistant
Since:
  • 2009.2
Source:
Returns:
Type
int

getSubList(name) → {nlobjSubList}

return a sublist on this page.
Parameters:
Name Type Description
name string sublist name
Since:
  • 2009.2
Source:
Returns:
Type
nlobjSubList

hasError() → {boolean}

return true if the assistant has an error message to display for the current step.
Since:
  • 2009.2
Source:
Returns:
Type
boolean

isFinished() → {boolean}

return true if all the steps have been completed.
Since:
  • 2009.2
Source:
Returns:
Type
boolean

sendRedirect(response) → {void}

redirect the user following a user submit operation. Use this to automatically redirect the user to the next logical step.
Parameters:
Name Type Description
response nlobjResponse the response object used to communicate back to the user's client
Since:
  • 2009.2
Source:
Returns:
Type
void

setCurrentStep(step) → {void}

mark a step as current. It will be highlighted accordingly when the page is displayed
Parameters:
Name Type Description
step nlobjAssistantStep assistant step object representing the current step that the user is on.
Since:
  • 2009.2
Source:
Returns:
Type
void

setError(html) → {void}

set the error message for the currrent step.
Parameters:
Name Type Description
html string error message (rich text) to display on the page to the user
Since:
  • 2009.2
Source:
Returns:
Type
void

setFieldValues(values) → {void}

set the values for all the fields on this page.
Parameters:
Name Type Description
values Object Object of field name/value pairs used to set all fields on page
Since:
  • 2009.2
Source:
Returns:
Type
void

setFinished(html) → {void}

mark assistant page as completed and optionally set the rich text to display on completed page.
Parameters:
Name Type Description
html string completion message (rich text) to display on the "Finish" page
Since:
  • 2009.2
Source:
Returns:
Type
void

setNumbered(numbered) → {void}

if numbered, step numbers are displayed next to the step's label in the navigation area
Parameters:
Name Type Description
numbered boolean If true (default assistant behavior) step numbers will be displayed next to the step label
Since:
  • 2009.2
Source:
Returns:
Type
void

setOrdered(ordered) → {void}

if ordered, steps are show on left and must be completed sequentially, otherwise steps are shown on top and can be done in any order
Parameters:
Name Type Description
ordered boolean If true (default assistant behavior) then a navigation order thru the steps/pages will be imposed on the user. Otherwise the user will be allowed to navigate across steps/pages in any order they choose.
Since:
  • 2009.2
Source:
Returns:
Type
void

setScript(script) → {void}

set the script ID for Client Script used for this form.
Parameters:
Name Type Description
script string, int script ID or internal ID for global client script used to enable Client SuiteScript on page
Since:
  • 2009.2
Source:
Returns:
Type
void

setShortcut(show) → {void}

show/hide shortcut link. Always hidden on external pages
Parameters:
Name Type Description
show boolean enable/disable "Add To Shortcut" link on this page
Since:
  • 2009.2
Source:
Returns:
Type
void

setSplash(title, text1, text2) → {void}

set the splash screen used for this page.
Parameters:
Name Type Argument Description
title string splash portlet title
text1 string splash portlet content (left side)
text2 string <optional>
splash portlet content (right side)
Since:
  • 2009.2
Source:
Returns:
Type
void

setTitle(title) → {void}

set the page title.
Parameters:
Name Type Description
title string
Since:
  • 2009.2
Source:
Returns:
Type
void