Once resource aliases are set up, you can reference them when creating any of the following:
Important: You must set your resource alias before referencing it. Resource aliases only apply to scripts and hooks that use supported JavaScript runtime (JSRT) functions.
- Scripts used for hooks (such as preSavePage, and postMap), in cases where you are using supported JavaScript runtime (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.
Comments
0 comments
Please sign in to leave a comment.