Closed kpiercy closed 6 months ago
Fix for this issue was found: https://github.com/intacct/intacct-sdk-js/issues/75#issuecomment-946220025
Switched from using Common.Query.QueryString to using Common.Query.Comparison.Like.LikeString():
let read = new IA.Functions.Common.ReadByQuery()
read.objectName = 'ARINVOICE'
read.fields = ['*']
let where = new IA.Functions.Common.Query.Comparison.Like.LikeString()
where.field = 'RECORDID'
where.value = `%${invNum}%`
read.query = where
Solution above.
Inside our Intacct integration I have an initial check using ReadByQuery that checks for a RECORDID to see if it exists prior to trying to create one. This check works fine for a RECORDID like 142507, but our system also passes a "-P" on some invoices. When using ReadyByQuery to search for "142507-P", the API is returning a _count of 0, where the record definitely exists inside the system.
Excerpt from our function: `let read = new IA.Functions.Common.ReadByQuery() read.objectName = 'ARINVOICE' read.fields = ['*'] read.query = new IA.Functions.Common.Query.QueryString( 'RECORDID = ' + invNum //invNum = 142507-P )