here is the code for that, like in a client script...
# suitescript
j
here is the code for that, like in a client script
Copy code
window = enhancedWindow.create();
window.table({
    title: 'Packages not on Contract: ' + record.getValue('name'),
    description: 'Check all packages that you would like to add to this contract.',
    id: 'package-table',
    columns: {
        checkbox: true,
        'name': 'Package ID',
        'custrecord_sh_pkg_description': 'Description',
        'custrecord_sh_pkg_hostname.name': 'Hostname',
        'custrecord_sh_pkg_totalamount': 'Total Cost',
        'custrecord_sh_pkg_period.name': 'Period',
        'custrecord_sh_pkg_contract.name': 'Contract'
    },
    search: search.create({
        type: 'customrecord_sh_uber_package',
        title: 'Customer Parent Package Search',
        id: 'customsearch_uber_parent_package',
        columns: [{
            name: 'name'
        }, {
            name: 'name',
            join: 'custrecord_sh_pkg_contract'
        }, {
            name: 'custrecord_sh_pkg_description'
        }, {
            name: 'name',
            join: 'custrecord_sh_pkg_hostname'
        }, {
            name: 'custrecord_sh_pkg_totalamount'
        }, {
            name: 'name',
            join: 'custrecord_sh_pkg_period'
        }],
        filters: [{
            "name": "custrecord_sh_pkg_customer",
            "operator": "is",
            "values": [CustomerId]
        }, {
            name: 'custrecord_sh_pkg_parentservice',
            operator: 'anyof',
            values: ['@NONE@']
        }, {

            name: 'custitem_sh_uber_category',
            join: 'custrecord_sh_pkg_item',
            operator: 'STARTSWITH',
            values: ['primary_']
        }, {
            name: 'custrecord_sh_pkg_contract',
            operator: 'noneof',
            values: [ContractId]
        }]
    }),
    foot: '<button id="switchOnContract" class="pgBntG bntBgB">Show Packages On Contract</button> <button id="add-contract-packages" style="float: right;" class="pgBntB pgBntG bntBgB">Add Packages</button>'
});