Custom Transaction Statuses in XML Definitions
In SuiteCloud Development Framework (SDF), you can add statuses to custom transactions for your users to track the progress of each transaction instance. For information about statuses, see Statuses for a Custom Transaction Type.
To display the Status field on the custom transaction instance in the NetSuite user interface, set the showstatus
field value to T. For information about the impact of displaying or hiding the status, see Displaying or Hiding the Status Field for a Custom Transaction Type.
If the custom transaction type has an application ID and was installed as part of a SuiteApp, the status sublist cannot be modified in the NetSuite user interface. You can modify the status sublist during application development using SuiteCloud Development Framework (SDF) by editing the XML definition of the SDF custom object in a SuiteCloud project.
In SDF, the status of the custom transaction can be referenced by one of the following IDs:
-
The
scriptid
attribute value for the status field.Use this ID for referencing the custom transaction status in an XML definition. Note that changing the
scriptid
attribute value signifies a new custom transaction status. -
The
id
field value.Use this ID for referencing the custom transaction status in SuiteScript. The
id
field value must not conflict with other status field id values defined in the custom transaction. For the list of possible values, see customtransactiontype_statuses_id.After the
customtransactiontype
SDF custom object exists in the target account, theid
field value cannot be changed. The id value can be changed when the statusscriptid
attribute is changed, because ascriptid
change signifies a new custom transaction status.
If an instance of the custom transaction exists, you cannot modify the posting field value or remove the status. Attempting to modify the posting value or remove the status results in a validation error. For information about modifying or deleting a custom transaction status, see Modifying or Deleting a Custom Transaction Type Status.
The following example defines two statuses for a custom transaction: Open
and Closed
.
<customtransactiontype scriptid="customtransaction1">
....
<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 preceding example, the custom transaction status can be referenced in the following ways:
-
Open status
-
Referenced in an XML definition using the
scriptid open_status
-
Referenced in SuiteScript using the
id
field value A
-
-
Closed status
-
Referenced in an XML definition using the
scriptid closed_status
-
Referenced in SuiteScript using the
id
field value B
-
By default, custom transactions also contain the following statuses:
-
voided, where the
scripid
isstatus_voided
and theid
value is V -
undefined, where the
scriptid
isstatus_undefined
and theid
value is Y
Consider the following information regarding the voided and undefined statuses:
-
The voided and undefined statuses do not appear in the XML definition of the
customtransactiontype
object. -
The
scriptid
for each status can be referenced by other objects. -
The
id
values V and Y are reserved for the voided and undefined statuses and cannot be used for other statuses.
To reference a custom transaction status, see Referencing a Custom Transaction in XML Definitions.