Associated Custom Record Type Object Structure

This section describes how to create and modify an associated custom record type object in SuiteCloud Development Framework (SDF), which is required when working with custom segments. The samples in this section are based on the campaign donor scenario. You can create the code samples in your SuiteCloud project to see how they all work together. For more information about setting up the scenario in your SuiteCloud project, see Campaign Donor Scenario Sample.

Each custom segment has its own associated custom record type that contains all of its possible values. When you create a custom segment in a project, you must create an associated custom record type along with it. When you import a custom segment into a SuiteCloud project, its associated custom record type is imported along with it.

Each value in the associated custom record type is represented in an instance structure. Instances are hierarchal, meaning that each instance can be parent of another instance. You can reference the script ID of a parent instance with the parent element in the child instance structure. When you deploy the associated custom record type object to a target account, the custom segment values appear in the same order as they are listed in the XML definition. Each associated custom record object supports up to 1000 instances. If your associated custom record contains more than 1000 instances, only the first 1000 are used.

Important:

Associated custom record type values cannot be deleted using SDF due to the possibility of a GL impact. For example, if you delete an instance from an associated custom record type object and then deploy the object to an account, the values do not get removed from the account. You can only make instances inactive by setting their isinactive element to T.

Instances of an associated custom record type can be filtered using a custom element, as displayed in the customrecord_cseg_campaignmedium example. For more information about how to filter custom segment values, see Custom Segment Value Filtering.

The following is an example of a region record type, customrecord_cseg_region, that is associated with the region custom segment, cseg_region, from the campaign donor scenario. This record contains all the possible values for the region segment field, such as New-England, Midwest, and Mid-Atlantic. Some values are expressed as parents of others. For example, Northeast is a parent of New-England. The file is saved as customrecord_cseg_region.xml in the Objects folder of the SuiteCloud project. For more information about the custom segment and the structure of that file, see Custom Segment Object Structure.

          <customrecordtype scriptid="customrecord_cseg_region">
    <allowattachments>F</allowattachments>
    <allowinlinedeleting>F</allowinlinedeleting>
    <allowinlinedetaching>F</allowinlinedetaching>
    <allowinlineediting>F</allowinlineediting>
    <allowquickadd>F</allowquickadd>
    <allowquicksearch>F</allowquicksearch>
    <customsegment>[scriptid=cseg_region]</customsegment>
    <enabledle>F</enabledle>
    <enablekeywords>F</enablekeywords>
    <enablemailmerge>F</enablemailmerge>
    <enableoptimisticlocking>F</enableoptimisticlocking>
    <enablesystemnotes>T</enablesystemnotes>
    <iconbuiltin>T</iconbuiltin>
    <includeinsearchmenu>F</includeinsearchmenu>
    <showcreationdate>F</showcreationdate>
    <showcreationdateonlist>F</showcreationdateonlist>
    <showlastmodified>F</showlastmodified>
    <showlastmodifiedonlist>F</showlastmodifiedonlist>
    <shownotes>T</shownotes>
    <showowner>F</showowner>
    <showownerallowchange>F</showownerallowchange>
    <showowneronlist>F</showowneronlist>
    <customrecordcustomfields>
        <customrecordcustomfield scriptid="custrecord_division_number">
            <accesslevel>2</accesslevel>
            <allowquickadd>F</allowquickadd>
            <applyformatting>T</applyformatting>
            <checkspelling>F</checkspelling>
            <defaultchecked>F</defaultchecked>
            <displaytype>NORMAL</displaytype>
            <encryptatrest>F</encryptatrest>
            <fieldtype>INTEGER</fieldtype>
            <globalsearch>F</globalsearch>
            <isformula>F</isformula>
            <ismandatory>F</ismandatory>
            <isparent>F</isparent>
            <label>Division Number</label>
            <rolerestrict>F</rolerestrict>
            <showinlist>F</showinlist>
            <storevalue>T</storevalue>
        </customrecordcustomfield>
    </customrecordcustomfields>
    <instances>
        <instance scriptid="_northeast">
            <custrecord_division_number></custrecord_division_number>
            <isinactive>F</isinactive>
            <name>Northeast</name>
        </instance>
        <instance scriptid="_new_england">
            <custrecord_division_number>1</custrecord_division_number>
            <isinactive>F</isinactive>
            <name>New-England</name>
            <parent>[scriptid=customrecord_cseg_region._northeast]</parent>
        </instance>
        <instance scriptid="_mid_atlantic">
            <custrecord_division_number>2</custrecord_division_number>
            <isinactive>F</isinactive>
            <name>Mid-Atlantic</name>
            <parent>[scriptid=customrecord_cseg_region._northeast]</parent>
        </instance>
        <instance scriptid="_midwest">
            <custrecord_division_number></custrecord_division_number>
            <isinactive>F</isinactive>
            <name>Midwest</name>
        </instance>
        <instance scriptid="_east_north_central">
            <custrecord_division_number>3</custrecord_division_number>
            <isinactive>F</isinactive>
            <name>East North Central</name>
            <parent>[scriptid=customrecord_cseg_region._midwest]</parent>
        </instance>
        <instance scriptid="_west_north_central">
            <custrecord_division_number>4</custrecord_division_number>
            <isinactive>F</isinactive>
            <name>West North Central</name>
            <parent>[scriptid=customrecord_cseg_region._midwest]</parent>
        </instance>
        <instance scriptid="_south">
            <custrecord_division_number></custrecord_division_number>
            <isinactive>F</isinactive>
            <name>South</name>
        </instance>
        <instance scriptid="_west">
            <custrecord_division_number></custrecord_division_number>
            <isinactive>F</isinactive>
            <name>West</name>
        </instance>
        <instance scriptid="_mountain">
            <custrecord_division_number>8</custrecord_division_number>
            <isinactive>F</isinactive>
            <name>Mountain</name>
            <parent>[scriptid=customrecord_cseg_region._west]</parent>
        </instance>
        <instance scriptid="_pacific">
            <custrecord_division_number></custrecord_division_number>
            <isinactive>F</isinactive>
            <name>Pacific</name>
            <parent>[scriptid=customrecord_cseg_region._west]</parent>
        </instance>
    </instances>
    <links>
        <link>
            <linkcategory>BASICSETUPCOMPANY</linkcategory>
            <linktasktype>LIST</linktasktype>
        </link>
    </links>
</customrecordtype> 

        

The following is an example of a campaign medium record type, customrecord_cseg_campaignmedium, that is associated with the region custom segment, cseg_campaignmedium, from the campaign donor scenario. This record contains all the possible values for the campaign medium segment field, such as Events, E-mail, and Website. The file is saved as customrecord_cseg_campaignmedium.xml in the Objects folder of the SuiteCloud project. For more information about the custom segment and the structure of that file, see Custom Segment Object Structure.

          <customrecordtype scriptid="customrecord_cseg_campaignmedium">
    <allowattachments>F</allowattachments>
    <allowinlinedeleting>F</allowinlinedeleting>
    <allowinlinedetaching>F</allowinlinedetaching>
    <allowinlineediting>F</allowinlineediting>
    <allowquickadd>F</allowquickadd>
    <allowquicksearch>F</allowquicksearch>
    <customsegment>[scriptid=cseg_campaignmedium]</customsegment>
    <enabledle>F</enabledle>
    <enablekeywords>F</enablekeywords>
    <enablemailmerge>F</enablemailmerge>
    <enableoptimisticlocking>F</enableoptimisticlocking>
    <enablesystemnotes>T</enablesystemnotes>
    <iconbuiltin>T</iconbuiltin>
    <includeinsearchmenu>F</includeinsearchmenu>
    <showcreationdate>F</showcreationdate>
    <showcreationdateonlist>F</showcreationdateonlist>
    <showlastmodified>F</showlastmodified>
    <showlastmodifiedonlist>F</showlastmodifiedonlist>
    <shownotes>T</shownotes>
    <showowner>F</showowner>
    <showownerallowchange>F</showownerallowchange>
    <showowneronlist>F</showowneronlist>
    <instances>
        <instance scriptid="_twitter">
            <cseg_campaignmedium_filterby_cseg_region>
                [scriptid=customrecord_cseg_region._northeast]|
                [scriptid=customrecord_cseg_region._new_england]|
                [scriptid=customrecord_cseg_region._mid_atlantic]|
                [scriptid=customrecord_cseg_region._midwest]|
                [scriptid=customrecord_cseg_region._east_north_central]|
                [scriptid=customrecord_cseg_region._west_north_central]|
                [scriptid=customrecord_cseg_region._south]|
                [scriptid=customrecord_cseg_region._west]|
                [scriptid=customrecord_cseg_region._mountain]|
                [scriptid=customrecord_cseg_region._pacific]
            </cseg_campaignmedium_filterby_cseg_region>
            <isinactive>F</isinactive>
            <name>Twitter</name>
        </instance>
        <instance scriptid="_events">
            <cseg_campaignmedium_filterby_cseg_region>
                [scriptid=customrecord_cseg_region._northeast]|
                [scriptid=customrecord_cseg_region._new_england]|
                [scriptid=customrecord_cseg_region._mid_atlantic]|
                [scriptid=customrecord_cseg_region._midwest]|
                [scriptid=customrecord_cseg_region._east_north_central]|
                [scriptid=customrecord_cseg_region._west_north_central]
            </cseg_campaignmedium_filterby_cseg_region>
            <isinactive>F</isinactive>
            <name>Events</name>
        </instance>
        <instance scriptid="_email">
            <cseg_campaignmedium_filterby_cseg_region>
                [scriptid=customrecord_cseg_region._northeast]|
                [scriptid=customrecord_cseg_region._south]|
                [scriptid=customrecord_cseg_region._west]
            </cseg_campaignmedium_filterby_cseg_region>
            <isinactive>F</isinactive>
            <name>Email</name>
        </instance> 
        <instance scriptid="_website">
            <cseg_campaignmedium_filterby_cseg_region>
                [scriptid=customrecord_cseg_region._west]|
                [scriptid=customrecord_cseg_region._mountain]|
                [scriptid=customrecord_cseg_region._pacific]
            </cseg_campaignmedium_filterby_cseg_region>
            <isinactive>F</isinactive>
            <name>Website</name>
        </instance> 
        <instance scriptid="_facebook">
            <cseg_campaignmedium_filterby_cseg_region>
                [scriptid=customrecord_cseg_region._northeast]|
                [scriptid=customrecord_cseg_region._new_england]|
                [scriptid=customrecord_cseg_region._mid_atlantic]|
                [scriptid=customrecord_cseg_region._midwest]|
                [scriptid=customrecord_cseg_region._east_north_central]|
                [scriptid=customrecord_cseg_region._west_north_central]|
                [scriptid=customrecord_cseg_region._south]|
                [scriptid=customrecord_cseg_region._west]|
                [scriptid=customrecord_cseg_region._mountain]|
                [scriptid=customrecord_cseg_region._pacific]
            </cseg_campaignmedium_filterby_cseg_region>
            <isinactive>F</isinactive>
            <name>Facebook</name>
        </instance>
    </instances>
    <links>
        <link>
            <linkcategory>BASICSETUPCOMPANY</linkcategory>
            <linktasktype>LIST</linktasktype>
        </link>
    </links>
</customrecordtype> 

        

For more information about the customrecordtype object, see customrecordtype.

Related Topics

Custom Segments as XML Definitions
Custom Segment Object Structure
Custom Segment Value Filtering
Custom Segment Object Permissions

General Notices