Search code examples
workflowonsubmitservicenowclient-side

Servicenow onSubmit Client Script


I'm working in ServiceNow and have a custom form that gives the user a choice on whether they want to change their address or their name. Depending on what they choose, I am hoping to direct them to the Change Address or Change Name forms, where it will kick off the appropriate workflow.

My initial thought on how to accomplish this is to write an onSubmit client script on the form where they can make their choice, which will direct them to the appropriate sub-form. Is this the right approach? If so, what would that script look like? Thanks!


Solution

  • I would probably use a Wizard to handle the branching. Panel 1: Do you want to update your Address? Yes/No > Panel 2 / 3 have forms specific to those fields. But really, it would be easier to just have them go to Self Service > Manage My Profile and update their information directly wouldn't it?

    You Would have to reveal the address fields and modify the ACLs to let the user update their own name. A work flow could then be tied to the sys_user table such that all changes have to be approved if you want to have some level of quality control..