getConfigurationPageUrl()
Function Declaration |
|
Type |
Interface function |
Description |
Access the user interface for configuring the plug-in. For most plug-in authors, this is a URL to a Suitelet. This URL appears on the Parser Configuration subtab on a format profile record. |
Returns |
void |
Input Parameters |
context -a JavaScript object with the following properties: |
Example
You should define a custom record to store your configuration for setting up a bank connection. You should then deploy a Suitelet to create a custom implementation of a UI to save and load the record. The Suitelet lets you implement a custom interface that enables you to give NetSuite access to your bank accounts.
When returning a URL to the deployed Suitelet (using the getConfigurationPageUrl
method), do not hardcode the URL. Instead, use the standard resolveScript
SuiteScript method to define the structure of the URL, which includes specifying the script ID, deployment ID, and parameters.
For information about Suitelets, see SuiteScript 2.x Suitelet Script Type. To build a UI in a Suitelet, see N/ui/serverWidget Module.
function getConfigurationPageUrl(context) {
var configurationId = context.pluginConfiguration.getConfigurationFieldValue({
name: 'configuration_id'
});
context.configurationPageUrl = url.resolveScript({
scriptId: 'customscript_configuration_suitelet',
deploymentId: 'customdeploy_configuration_deployment',
params: {
configurationId: configurationId
}
});
}