Hello,
I am using the API to create Employee Onboarding requests in FreshService. Three fields on the employee onboarding form are lookup fields using FreshService datasources (these are not custom objects). I’ve looked through the API documentation and I cannot find any guidance on how to set a value for this type of field.
As an example, my onboarding form includes a required lookup field for Reporting Manager. I would like to set Reporting Manager to be Bob Smith, a user in FreshService. How would I go about doing that? I’m using the code below to test with, and in this code “actor_3” is the lookup field I want to set to Bob Smith. The code below returns an error “invalid field value for field”.
Hello, I’ve been able to correct issues with 2/3 fields that were returning errors (thank you for the suggestion), but a third field does not seem to accept a value in the same way that the other lookup field does. The first example below works and the cf_location lookup field accepts the location id number.
The second example does not work, yet I am passing a valid department id to the cf_department lookup field. Is there something else I’m missing here? My expectation is that both lookup fields accept the id values in the same way.
Hello @blabarbera, perhaps try using the department name as a string instead of the ID?
One thing you could try is creating the onboarding request through the UI and then use a GET request to get back the ticket details, that response would have values for your custom fields, hopefully indicating the value types it is looking for. Just a thought. Take care.