Custom Transaction Record Types as XML Definitions
SuiteCloud Development Framework (SDF) supports custom transaction record types that are tailored to your business needs. For use cases, see Benefits of Custom Transaction Types.
Use the customtransactiontype
SDF custom object to develop custom transaction types in a SuiteCloud project. You can create new custom transactions, or import existing custom transactions into your SuiteCloud project using SuiteCloud IDE plug-in.
For more information about custom transactions, see the following:
-
For a list of custom transaction fields available in SDF, see customtransactiontype.
-
To create a custom transaction in the NetSuite user interface, see Creating a Custom Transaction Type.
Consider the following information when working with custom transaction types as XML definitions:
-
The following custom transaction list styles require specific
scriptid
prefixes:-
For the Basic, Journal, and Header only transaction types, the
scriptid
prefix must becustomtransaction
. -
For the Sales transaction type, the
scriptid
prefix must becustomsale
. -
For the Purchase transaction type, the
scriptid
prefix must becustompurchase
.
For information about those custom transaction list styles, see Multiple Custom Transaction Styles Supported.
-
-
When you create a custom transaction type, the system automatically creates a standard form for the type. You cannot create custom transaction forms for custom transactions in SDF. To use the NetSuite user interface to add custom forms, see Adding Custom Forms for a Custom Transaction Type.
-
SDF supports the text fields and status of a custom transaction type.
-
SDF supports permissions in a custom transaction type.
When you deploy a custom transaction that includes a permissions sublist, the permissions are also updated in the target account. The following example includes a permissions sublist:
<customtransactiontype scriptid="customtransaction2"> ... <permissions> <permission> <permittedlevel>NONE</permittedlevel> <permittedrole>[scriptid=customrole_transactionapprover]</permittedrole> </permission> </permissions> ... </customtransactiontype>
-
SDF does not support:
-
Instances of custom transactions
-
Sublist links in the custom transaction type
-
Fields from the Document Numbers tab and Transaction Numbers tab of the NetSuite user interface
-
The following fields in custom transactions:
account
,numberinginitupdate
,linkinsertbefore
,showallforms
Important:Although the Account field is required when the transaction type’s List Style is Basic, the Account field does not exist in the
customtransactiontype
SDF custom object XML definition. The account must be specified for the SDF custom object in the NetSuite user interface after installing the SuiteApp or deploying the SDF custom object to an account. To edit the Account field, see Editing a Custom Transaction Type.
-
-
To deploy custom transaction type objects to a target NetSuite account, enable the Custom Transactions feature. For more information, see Enabling the Custom Transactions Feature and Deployment Logs for SuiteCloud Projects.
-
Consider the following information for SDF SuiteApps and SuiteApp projects:
-
For role permissions that exist in the target account but not in the permission field group of the
customtransactiontype
SDF custom objects in the SDF SuiteApp (or SuiteApp project), the permissions in the target account will not be changed or removed. -
For role permissions that exist in both the permission field group of the
customtransactiontype
SDF custom objects in the SDF SuiteApp or SuiteApp project and the target account, the permissions in the target account will be changed to the XML values for the permissions in the SDF SuiteApp or SuiteApp project.
-
-
Consider the following information for account customization projects:
-
For role permissions that exist in the target account but not in the permission field group of the
customtransactiontype
SDF custom objects in the account customization project, the permissions in the target account will not be changed or removed. -
For role permissions that exist in both the permission field group of the
customtransactiontype
SDF custom objects in the account customization project and the target account, the permissions in the target account will be changed to the XML values for the permissions from the account customization project.
-
The following is an example of a customtransactiontype
SDF custom object that defines a group purchase custom transaction:
<customtransactiontype scriptid="customtransaction_grouppurchase">
<iscredit>F</iscredit>
<isposting>F</isposting>
<isvoidable>F</isvoidable>
<name>Group Purchase</name>
<showstatus>F</showstatus>
<subliststyle>BASIC</subliststyle>
<segments>
<classmandatory>F</classmandatory>
<classposition>NONE</classposition>
<departmentmandatory>F</departmentmandatory>
<departmentposition>HEADER</departmentposition>
<locationmandatory>F</locationmandatory>
<locationposition>LINE</locationposition>
</segments>
<statuses>
<status scriptid="open_status">
<id>A</id>
<description>Open</description>
<posting>F</posting>
</status>
<status scriptid="closed_status">
<id>B</id>
<description>Closed</description>
<posting>T</posting>
</status>
</statuses>
</customtransactiontype>
In the example, the following fields define the position of the segment fields in the transaction:
-
classmandatory
-
classposition
-
departmentmandatory
-
departmentposition
-
lo
cationmandatory
-
locationposition
For additional information about custom transactions, see the following:
Related Topics
- Lists, Records, and Fields
- Custom Lists as XML Definitions
- Custom Other Record Fields as XML Definitions
- Custom Item Fields as XML Definitions
- Custom CRM Fields as XML Definitions
- Custom Entity Fields as XML Definitions
- Custom Item Number Fields as XML Definitions
- Custom Transaction Body Fields as XML Definitions
- Custom Transaction Line Fields as XML Definitions
- Custom Transaction Item Option Fields as XML Definitions
- Custom Record Types as XML Definitions
- Custom Segments as XML Definitions