RE: Can’t join from Timebill to Employee record from Query module?

Having issues joining to employee record from timebill. I know you can but its a bit weird. First off, I get this error when attempting to do an autoJoin on the ’employee’ field on the time bill

{“type”:”error.SuiteScriptError”,”name”:”SSS_SEARCH_ERROR_OCCURRED”,”message”:”Search error occurred: Record Join ’employee’ for record ‘timeBill’ was not found.”,”stack”:[“Error”],”cause”:{“type”:”internal error”,”code”:”SSS_SEARCH_ERROR_OCCURRED”,”details”:”Search error occurred: Record Join ’employee’ for record ‘timeBill’ was not found.”,”userEvent”:null,”stackTrace”:[“Error”],”notifyOff”:false},”id”:””,”notifyOff”:false,”userFacing”:true}

The SuiteAnalytics workbook allows you to do this join and I can even see the id for the “title” field on the employee looks like


Not sure what the caret means and i’m hoping its easy once you know whats going on but thats not normally there and I know the join works.


TheUsualSuspect Beginner Asked on March 18, 2020 in SuiteScript.
Add Comment
1 Answers

Okay so I solved this myself and thought I might as well answer. The error message is misleading in that you can’t do an autoJoin because its a polymorphic join.  To fix this you need to specify a target for the join to let it know what relationship you are expecting. That is what the caret is indicating in the id. Do a joinTo() and include ’employee’ as the target parameter and it should work

Beginner Answered on March 18, 2020.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.