Custom Record Type Object Custom Fields

In SuiteCloud Development Framework (SDF), custom record custom fields are defined in a custom record type object.

Custom fields are grouped within the customrecordcustomfields structure. In this structure, you can create as many custom fields as needed by specifying a customrecordcustomfield structure for every field. The order that you define each customrecordcustomfield determines where they appear on the custom record in the NetSuite UI. The first customrecordcustomfield in the object appears toward the top of the custom record while the last customrecordcustomfield appears toward the bottom.

Each customrecordcustomfield structure contains elements that define the field. All custom record type field definitions and subtabs are supported as elements in SDF. For more information about the elements that you can specify for a custom record custom field, see the following:

The following example shows a custom free-form text field with access limited to the Bookkeeper role:

          <customrecordtype scriptid="customrecord_sample">
    ...
    <customrecordcustomfields>
        <customrecordcustomfield scriptid="custrecord_samplefield">
            <accesslevel>2</accesslevel>
            <allowquickadd>F</allowquickadd>
            <applyformatting>F</applyformatting>
            <checkspelling>T</checkspelling>
            <defaultchecked>F</defaultchecked>
            <defaultselection></defaultselection>
            <defaultvalue></defaultvalue>
            <description></description>
            <displayheight></displayheight>
            <displaytype>NORMAL</displaytype>
            <displaywidth></displaywidth>
            <dynamicdefault></dynamicdefault>
            <encryptatrest>F</encryptatrest>
            <fieldtype>TEXT</fieldtype>
            <globalsearch>F</globalsearch>
            <help></help>
            <isformula>F</isformula>
            <ismandatory>F</ismandatory>
            <isparent>F</isparent>
            <label>My Custom Field</label>
            <linktext></linktext>
            <maxlength></maxlength>
            <maxvalue></maxvalue>
            <minvalue></minvalue>
            <onparentdelete></onparentdelete>
            <parentsubtab></parentsubtab>
            <rolerestrict>F</rolerestrict>
            <searchcomparefield></searchcomparefield>
            <searchdefault></searchdefault>
            <searchlevel>2</searchlevel>
            <selectrecordtype></selectrecordtype>
            <showinlist>F</showinlist>
            <sourcefilterby></sourcefilterby>
            <sourcefrom></sourcefrom>
            <sourcelist></sourcelist>
            <storevalue>T</storevalue>
            <subtab></subtab>
            <roleaccesses>
                <roleaccess>
                    <accesslevel>2</accesslevel>
                    <role>BOOKKEEPER</role>
                    <searchlevel>2</searchlevel>
                </roleaccess>
            </roleaccesses>
         </customrecordcustomfield>
    </customrecordcustomfields>
    ...
</customrecordtype> 

        
Note:

To make a custom field available for data entry in the Quick Add portlet, set the allowquickadd value to T. By default, this value is set to F. For more information, see Quick Add Portlet.

Applying Role-Based Access Restrictions

You can apply role-based restrictions on custom fields for particular categories such as department, class, location, employee, or subsidiary. For example, if you restrict access on an Employee SELECT field, the employee-based restriction set on the Sales Manager role record is applied to the custom record so that sales managers can see the custom record when they or their subordinates are set to the value of the custom field.

To apply role-based access restrictions on a custom record type, set the rolerestrict value to T, the fieldtype value to SELECT, and the selectrecordtype value to one of the following values:

  • -4 for Employee

  • -101 for Class

  • -102 for Department

  • -103 for Location

  • -117 for Subsidiary

For more information about:

Parent-Child Record Relationships

You can establish parent-child relationships between records when certain conditions are met in a custom field.

Set the fieldtype value to SELECT so that the isparent and parentsubtab elements becomes available for use. When the isparent value is set to T, you can specify a parent subtab by setting the parentsubtab value to a custom or standard subtab. For more information about possible standard subtab values, see generic_tab_parent.

The following example shows a custom record custom field that is set to appear under the Message subtab of a Call record:

            <customrecordtype scriptid="customrecord_sample">
    ...
    <customrecordcustomfields>
        <customrecordcustomfield scriptid="custrecord_samplefield">
            ...
            <label>My Custom Field</label>
            <fieldtype>SELECT</fieldtype>
            <isparent>T</isparent>
            <parentsubtab>CRMMESSAGE</parentsubtab>
            <selectrecordtype>-22</selectrecordtype>
            ...
        </customrecordcustomfield>
    </customrecordcustomfields>
    ...
</customrecordtype> 

          

Related Topics

Custom Record Types as XML Definitions
Custom Record Type Object Subtabs
Custom Record Type Object Sublists
Custom Record Type Object Permissions
Custom Record Type Object Links
Custom Record Instances

General Notices