Scenario: I have a transaction saved search in a function, and the internal ID used to filter out the search results, based on the internal ID of the transaction record, is passed from where the function is invoked. However, an error “elem._marshal is not a function” occurred when running the script.
Solution: The error occurred because I was passing an object instead of a single value for the internal ID.