Steve Reeder
Steve Reeder

Reputation: 1022

Netsuite Filtering an item sublist according to vendor in a parent record

I'm wondering if there is a way in custom field/form creation, to limit the items available to be entered in a sublist. Ideally, the items would be limited to a vendor entered in the parent record.

ie. reviewing supplier costs via a custom record with a custom subrecord/sublist. vendor name is entered in the parent, then only items purchased from that vendor would be able to be entered in the sublist lines.

Upvotes: 1

Views: 2956

Answers (3)

erictgrubaugh
erictgrubaugh

Reputation: 8847

If you are specifically talking about the Items sublist on Transactions, then you can filter these using any Item Saved Search. On your custom Transaction Entry form, go to Screen Fields > Columns then set the Item Filter field to the saved search you would like to use.

See the NS Help article titled "Filtering the Items Dropdown List on Transactions"

Upvotes: 0

bknights
bknights

Reputation: 15367

If your sublist has the parent as an actual parent("record is parent" checked) then go to the "Sourcing and Filtering" tab of the item field and filter based on the parent's vendor field.

Upvotes: 1

prasun
prasun

Reputation: 7343

This is hard to do for a sublist field and is feasible for header fields though using nlobjform methods.

Alternatively, what you could do is, write a client script with fieldChanged event function, the function can do a search to see if item selected is not of vendor, show an alert and unset the value.

function FieldChanged(type, name, lineNum)
{
    if (type =='item' && name == 'item') 
    {
        //do search and verify value
        if(valueNotAsExpected)
        { alert("Unexpected item."); nlapiSetLineItemValue('item', 'item', lineNum, null)}
    }
}

Upvotes: 0

Related Questions