Custom Record Types as XML Definitions

Custom record types are entry forms that collect information specific to the needs of your business.

You can create and manage custom record types using SuiteCloud Development Framework (SDF). You can model a custom record type in a SuiteCloud project and deploy the project to a NetSuite account. You can either create new custom record types in your project or import existing custom record types from a NetSuite account. For more information about working with custom record types in a NetSuite account, see Creating Custom Record Types.

Custom record type objects, defined by the customrecordtype object, are comprised of several structures, including the following:

Custom record types in SDF do not support the following subtabs displayed in NetSuite:

The following example shows a basic custom record type object named “Sample Custom Record Type” with the script ID named customrecord_sample where all standard options are set to their default values:

          <customrecordtype scriptid="customrecord_sample">
    <accesstype>CUSTRECORDENTRYPERM</accesstype>
    <allowattachments>T</allowattachments>
    <allowinlinedeleting>F</allowinlinedeleting>
    <allowinlinedetaching>T</allowinlinedetaching>
    <allowinlineediting>F</allowinlineediting>
    <allowmobileaccess>F</allowmobileaccess>
    <allownumberingoverride>F</allownumberingoverride>
    <allowquickadd>T</allowquickadd>
    <allowquicksearch>F</allowquicksearch>
    <allowuiaccess>T</allowuiaccess>
    <description></description>
    <enabledle>T</enabledle>
    <enablekeywords>T</enablekeywords>
    <enablemailmerge>F</enablemailmerge>
    <enablenumbering>F</enablenumbering>
    <enableoptimisticlocking>T</enableoptimisticlocking>
    <enablesystemnotes>T</enablesystemnotes>
    <hierarchical>F</hierarchical>
    <icon></icon>
    <iconbuiltin>T</iconbuiltin>
    <iconindex>30</iconindex>
    <includeinsearchmenu>T</includeinsearchmenu>
    <includename>T</includename>
    <isinactive>F</isinactive>
    <isordered>F</isordered>
    <numberinginit></numberinginit>
    <numberingmindigits></numberingmindigits>
    <numberingprefix></numberingprefix>
    <numberingsuffix></numberingsuffix>
    <recordname>Custom Record Type Sample</recordname>
    <showcreationdate>F</showcreationdate>
    <showcreationdateonlist>F</showcreationdateonlist>
    <showid>F</showid>
    <showlastmodified>F</showlastmodified>
    <showlastmodifiedonlist>F</showlastmodifiedonlist>
    <shownotes>T</shownotes>
    <showowner>F</showowner>
    <showownerallowchange>F</showownerallowchange>
    <showowneronlist>F</showowneronlist>
</customrecordtype> 

        

For more information about the standard options and what they do, see the following:

Custom Record Type Object Icon Management

You can choose an icon to represent a custom record using the icon, iconbuiltin, and iconindex elements in a customrecordtype object.

Icons are displayed in the following places when they are specified in the SDF custom object type:

  • The Create New menu on records

  • The New column on list pages and list portlets

  • The Recent Records menu

  • The Recent Records portlet

  • QuickViews

For more information about using a:

  • Prebuilt icon, set the iconbuiltin value to T, and set the iconindex value to one of the 70 prebuilt icons in NetSuite. For information about possible values, see generic_custom_record_icon.

  • Custom icon, set the iconbuiltin value to F, and set the icon value to a File Cabinet reference. For information about how to specify file references, see Developing SDF Custom Objects.

The following example shows a custom record type object that uses a custom icon located in File Cabinet/Images/111.jpg.

            <customrecordtype scriptid="customrecord_sample">
    ...
    <icon>[/Images/111.jpg]</icon>
    <iconbuiltin>F</iconbuiltin>
    <iconindex></iconindex>
    ...
</customrecordtype> 

          

For more information about icon creation guidelines, see Creating Icons for Custom Records.

Numbering Custom Record Type Objects

You can have numbers automatically assigned to your custom record instances for easier tracking and designation.

Warning:

After you enable auto-numbering, numbers cannot be removed from records. Disabling auto-numbering in the future only prevents future records from being numbered.

Numbering custom record type object instances are controlled with the following elements:

  • enablenumbering — Set this value to T to enable numbering.

  • numberingprefix — Set this value to any numbers or letters that you want added before each automatically generated number.

  • numberingsuffix — Set this value to any numbers or letters that you want added after each automatically generated number.

  • numberingmindigits — Set this value to the number of digits you want as the minimum for automatically generated numbers, ranging from 0-20. For example, enter 5 to have the first number added as 00001.

  • numberinginit — Set this value to the first number that you want to use to begin automatic numbering.

  • allownumberingoverride — Set this value to enable the ability to make the number editable when you edit the custom record.

The following example shows a custom record type object that numbering, where the first instance is assigned rec_num_00001_sandbox, followed by rec_num_00002_sandbox, and so forth:

            <customrecordtype scriptid="customrecord_sample">
    ...
    <enablenumbering>T</enablenumbering>
    <numberingprefix>rec_num_</numberingprefix>
    <numberingsuffix>_sandbox</numberingsuffix>
    <numberingmindigits>5</numberingmindigits>
    <numberinginit>1</numberinginit>
    <allownumberingoverride>F</allownumberingoverride>
    ...
</customrecordtype> 

          

Related Topics

General Notices