Single Page Application XML Definition Example
The following shows a sample XML definition for a single page application (SPA) object in a SuiteApp project named SPA Example with the following information:
-
The script ID is
custspa_appdashboard
, and the file name for the object definition file iscustspa_appdashboard.xml
(not shown in the sample). -
The
SpaClient.js
andSpaServer.js
script files are located at:/SuiteApps/com.example.spa/app-dashboard/
folder (undersrc/FileCabinet
). -
The SPA object runs on the following URL:
https://
<AccountID>
.app.netsuite.com/spa-app/com.example.spa/app-dashboard
-
The SPA audience includes all internal roles (because
<audienceallroles>T</audienceallroles>
is set) and the two external roles in the<audienceroles>
list. -
The object definition includes all optional fields supported for the SPA object.
For information about SPA SDF custom objects in SuiteApp projects, see Single Page Applications as XML Definitions and singlepageapp.
<singlepageapp scriptid="custspa_appdashboard">
<name>SPA Example</name>
<description>This is a sample SPA SuiteApp that uses NetSuite UIF.</description>
<url>app-dashboard</url>
<folder>[/SuiteApps/com.example.spa/app-dashboard/]</folder>
<clientscriptfile>[/SuiteApps/com.example.spa/app-dashboard/SpaClient.js]</clientscriptfile>
<serverscriptfile>[/SuiteApps/com.example.spa/app-dashboard/SpaServer.js]</serverscriptfile>
<assetsfolder>[/SuiteApps/com.example.spa/app-dashboard/assets/]</assetsfolder>
<loglevel>DEBUG</loglevel>
<audienceallroles>T</audienceallroles>
<audienceroles>CUSTOMER_CENTER|EMPLOYEE_CENTER</audienceroles>
<executeas></executeas>
<links>
<link>
<linkcategory>BASICSETUPCUSTOMIZATION</linkcategory>
<linklabel>App Dashboard</linklabel>
</link>
</links>
<notifyuser>F</notifyuser>
<notifyowner>T</notifyowner>
<notifyadmins>F</notifyadmins>
<notifyemails>testemail@test.com</notifyemails>
</singlepageapp>