mrob
11/05/2024, 9:12 PMmrob
11/05/2024, 9:12 PMmrob
11/05/2024, 9:13 PMerictgrubaugh
11/05/2024, 9:23 PMRecord
instance come from in the Restlet?mrob
11/05/2024, 9:30 PMrec = record.load({ type: 'customer', id: whatever, isDynamic: true })
mrob
11/05/2024, 9:31 PMrec.findSublistLineWithValue('taxregistration', 'nexuscountry', 'US')
is an example that does not work in the restlet (2.1) but does work via suitescript in console. Tested with hard coded 'US' though obviously the eventual goal is a variable (row['country']
)erictgrubaugh
11/05/2024, 9:33 PMnexuscountry
between the Restlet and console? Maybe it's a different value on the server sidemrob
11/05/2024, 10:12 PMmrob
11/06/2024, 11:02 PMrec.toJSON().sublists.taxregistration['line 1']
=> {address: null, id: "1673", nexus: "3", nexus_display: "Germany", nexuscountry: "DE", …}
existingLineNumber = rec.findSublistLineWithValue('taxregistration', 'nexus', 'DE')
=> -1
rec.toJSON().sublists.taxregistration['line 1']['nexuscountry'] == 'DE'
=> true
rec.id
=> 5659
mrob
11/06/2024, 11:03 PMrec = record.load({ type: 'customer', id: 5659, isDynamic: true })
=> DynamicRecord {getMacros: ƒ, getMacro: ƒ, executeMacro: ƒ, …}
rec.findSublistLineWithValue('taxregistration', 'nexuscountry', 'DE')
=> 0
rec.toJSON().sublists.taxregistration['line 0']['nexuscountry']
=> {value: undefined, legacyStringValue: 'DE'}
mrob
11/06/2024, 11:04 PM