Referencing a Custom Transaction in XML Definitions
Your users can use custom transactions in other SDF custom objects that reference the transaction.
In SuiteCloud Development Framework (SDF), custom transactions are referenced by the scriptid
attribute value for the customtransactiontype
element, for example, customtransaction_grouppurchase
.
To reference a custom transaction status, append the status scriptid
to the customtransaction scriptid
, for example, c
ustomtransaction_grouppurchase.open_status
. For more information about custom transaction statuses, see Custom Transaction Statuses in XML Definitions.
Custom transaction types can be referenced by the following SDF custom objects:
-
centercategory
, using thelinkobject
field. For example:<centercategory scriptid="custcentercategory_adjustments_category"> ... <links> <link> <linklabel></linklabel> <linkobject>[scriptid=customtransaction_fixed_asset]</linkobject> <linktasktype>LIST</linktasktype> <shortlist>F</shortlist> </link> </links> ... </centercategory>
-
role
, using the permkey field.You can include role objects in your SuiteCloud project that grant a permission to the custom transaction type in the target account. When the custom role is in the same SuiteCloud project as the custom transaction, both objects must have matching permissions. The following example adds the VIEW permission to custom transaction
customtransaction2
:<role scriptid="customrole_sample1> .... <permissions> <permission> <permkey>[customtransaction2]</permkey> <permlevel>VIEW</permlevel> </permission> </permissions> .... </role>
-
sublist
, using a saved search that references a custom transaction.The saved search must be defined in the NetSuite user interface. For more information, see Defining a Saved Search and Sublists as XML Definitions.
-
transactionbodycustomfield
, using thebodycustomtransactions
field. For example:<transactionbodycustomfield scriptid="custbody_notes"> ... <bodycustomtransactions>[scriptid=customtransaction106]</bodycustomtransactions> ... </transactionbodycustomfield>
-
transactioncolumncustomfield
, using thecolumncustomtransactions
field. For example:<transactioncolumncustomfield scriptid="custcol_123"> ... <columncustomtransactions>[scriptid=customtransaction108]</columncustomtransactions> ... </transactioncolumncustomfield>
-
workflow
, by setting a field value that is a custom transaction type status. For example:<workflow scriptid="customworkflow10"> ... <workflowstates> <workflowstate scriptid="workflowstate17"> ... <workflowactions triggertype="ONENTRY"> <setfieldvalueaction scriptid="workflowaction7" <field>STDBODYTRANSTATUS</field <schedulemode>DELAY></schedulemode> <valueselect>[scriptid=customtransaction_grouppurchase.open_status]</valueselect> <valuetype>STATIC</valuetype> </setfieldvalueaction> </workflowactions> </workflowstate> </workflowstates> </workflow>
For more information, see Custom Transaction Types in Workflows.
In addition to the SDF custom objects described in the previous list, all custom fields can reference custom transaction types. The following example references a custom transaction in a custom field filter:
<customfieldfilters>
<customfieldfilter>
...
<fldfiltersel>[scriptid=customtransaction_operation]</fldfiltersel>
...
</customfieldfilter>
</customfieldfilters>