AnsweredAssumed Answered

Netsuite - Connector unable to lookup value for Class

Question asked by GuinScholl3001 on Apr 30, 2016
Latest reply on May 10, 2016 by Adam Arrowsmith

I'm about to give up on using the built-in "lookup" functionality for lists and custom lists that the NetSuite Connector performs and grab and cache all the necessary internal ids manually. However, before I do that I thought I would check to see if anyone else has run into this issue. 


I'm performing an UPSERT on an Inventory Item record.  I have been able to successfully get the UPSERT to work with a basic limited number of fields, but I'm having tons of issues with NetSuite doing the lookup automatically for several types of values. Plain old customlist objects seem to work fine (I map to the destination Value and the lookup works).  But lists where NetSuite has it's own internal enums (for example Country Names), and netsuite recordRef objects like NetSuite's Class object behave strangely.  I have 100+ custom fields/lists on our Item Master so I am at the point of trying to determine how much more time to spend.


Here is one example:

I am trying to have the connector lookup and return the internal id for the Class field in NetSuite.   In NetSuite the value "Bullion" has an internal_id = 1.  I've ruled out any source data issues by testing this by simply "Setting Default Values" for the field in the destination NetSuite profile. If I manually map a value of 1 to the Class field's @internalID element, everything works fine (obviously).



However, if I try to have NetSuite lookup the value, by mapping the value of "Bullion" as depicted below, it does not work.



It returns the error:

java.lang.Exception: Error trying to look up id for record ref - No Results Returned: class, value:



I've looked at the NetSuite WebServices logs, and it appears that the connector is attempting to lookup the value with a bunch of white space before the value of "Bullion".   However, trimming whitespace from the source value doesn't work because it appears to be adding it after the value is mapped and just prior to sending to NetSuite.


Here is the soap body and there are clearly some spaces or unintended characters prior to the value "Bullion"





Also a view from anXML editor in grid mode.  None of the other values in the XML, have padding like this field.




Has anyone experienced this before?   Thanks for any insight.