Forum Discussion

rmedeiros's avatar
rmedeiros
New Contributor III
3 years ago

Sorting Error after Netsuite Search

Hi!

I’m building an integration here that gets contacts from Hubspot and update them as customers to Netsuite. I’m getting data from Netsuite by querying a saved search. After getting the data i need to sort to diff. The problem is that when i validate it takes a few minutes to the Netsuite Search to become green and, before that happens, the Sort snap will fail and become red. I tried using the Async Search and had the same issue.

Do you know why its happening?

This is the error shown at Sort snap:
Failure: class java.util.LinkedHashMap cannot be cast to class java.lang.Comparable (java.util.LinkedHashMap and java.lang.Comparable are in module java.base of loader ‘bootstrap’), Reason: Snap failed unexpectedly and did not provide any reason

6 Replies

  • Try this in the sort:
    $record.email[‘platformCore:searchValue’]

    It looks like you’re trying to have the Sort work on an object, which I believe it can only handle scalar values.

  • rmedeiros's avatar
    rmedeiros
    New Contributor III

    The image i sent shows the pipeline while its validating, all snaps will eventually become green, except the Sort one.

  • Can you show the properties of your Sort snap? A sample of the incoming documents to the Sort would also be helpful.

    • rmedeiros's avatar
      rmedeiros
      New Contributor III

      These are the incoming docs:

      This is the sort snap:

      This is what happens when i try the same query but async:

  • rmedeiros's avatar
    rmedeiros
    New Contributor III

    Thanks a lot for the help. The sort snap is working correctly now.

    But not that the sorting path from both streams are different, how should i set the Diff snap to work with both?