Once resource aliases are set up, you can reference them when creating any of the following:
- Scripts used for hooks (such as preSave, postMap, etc.), in cases where you are using supported JSRT functions.
- Custom forms used to configure resources (such as a page that prompts a user to configure additional settings before running a flow).
- Special connection routes, such as when you create a connection to a custom NetSuite RESTlet.
Referencing aliases instead of specific resource IDs for connections, exports, imports, and flows reduces maintenance and enables portability.
Reference an alias in a hook
- Create or edit the script used for a hook.
- In the Script editor, click View aliases on the top right.
- Locate the alias for the appropriate resource.
- To see more information about an alias, click … in the Actions column and then click View details.
- Click … in the Actions column and then click Copy alias.
- Paste the alias into the appropriate location in your script.
- If Auto preview is enabled or you click Preview, the alias should be resolved and the output of the invoked function should appear.
Reference an alias in a custom form
Note: This feature requires Developer mode.
- Create or edit the custom setting and form.
- In the Form builder, click View aliases on the top right.
- Locate the alias for the appropriate resource.
- To see more information about an alias, click … in the Actions column and then click View details.
- Click … in the Actions column and then click Copy alias.
- Paste the alias into the appropriate location in your form definition code.
- If Auto preview is enabled or you click Preview, the alias should be resolved and the output of the invoked integrator.io API function should appear.
Reference an alias in a connection route
- Determine which alias points to the connection you want to use and copy it to the clipboard:
- To see the aliases, navigate to the flow and click the [gear icon] to open the Settings. In the Advanced section under Aliases, click Manage.
- Locate the alias you want to use. In the Actions column, click … and then click Copy alias.
- When configuring the connection route, paste the Alias ID (instead of a specific connection ID). For example, if you have an alias for a NetSuite connection defined as "ns_conn", the proxy URI would be:
/v1/connections/ns_conn/proxy
Comments
0 comments
Please sign in to leave a comment.