I have a custom record that is a child record of a transaction. So there is a field of type list/record that links to the transaction.
However, sometimes the custom record will exist with no transaction.
I want to be able to search for all the child records that have no associated transaction. Any idea how to do this?
This doesn't work:
var filt = new Array(); filt.push(new nlobjSearchFilter( 'custrecord_sea_hu_wo', null, 'noneof', ['0'])); var col = new Array(); col.push(new nlobjSearchColumn('name')); col.push(new nlobjSearchColumn('custrecord_sea_itemref')); col.push(new nlobjSearchColumn('custrecord_sea_hunit_qty')); col.push(new nlobjSearchColumn('custrecord_sea_hu_wo')); var results = nlapiSearchRecord('customrecord_sea_hunit', null, filt, col);The data returned look like this:[ {"id":"9","recordtype":"customrecord_sea_hunit", "columns":{"name":"HU0000000009", "custrecord_sea_itemref":{"name":"Recycled Kraft","internalid":"4994"}, "custrecord_sea_hunit_qty":907, "custrecord_sea_hu_wo":{"name":"Work Order #WO7643","internalid":"541638"}}}, {"id":"10","recordtype":"customrecord_sea_hunit", "columns":{"name":"HU0000000010", "custrecord_sea_itemref":{"name":"Recycled Kraft","internalid":"4994"}, "custrecord_sea_hunit_qty":906, "custrecord_sea_hu_wo":{"name":"Work Order #WO7643","internalid":"541638"}}}, {"id":"12","recordtype":"customrecord_sea_hunit", "columns":{"name":"HU0000000012", "custrecord_sea_itemref":{"name":"Recycled Kraft","internalid":"4994"}, "custrecord_sea_hunit_qty":876}}, {"id":"13","recordtype":"customrecord_sea_hunit", "columns":{"name":"HU0000000013", "custrecord_sea_itemref":{"name":"Recycled Kraft","internalid":"4994"}, "custrecord_sea_hunit_qty":994, "custrecord_sea_hu_wo":{"name":"Work Order #WO8071","internalid":"575223"}}} ,... The link "custrecord_sea_hu_wo" is just missing if it's never been set.