Reputation: 1022
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
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
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
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