# Debugging Saved Search Jobs Because so many configuration parameters are involved, both within NetSuite and within Mitto, it is sometimes difficult to pin down the cause of saved search jobs that aren't working as expected. One technique is to eliminate Mitto from the picture and execute the saved search via Mitto's Saved Search RESTlet directly from the browser. This is helpful in that it can identify user/permission problems and it displays the data returned by the NetSuite saved search verbatim in the browser. These instructions use FireFox, though Chrome can be used in a similar manner. 1. Get the internal id of the saved search you wish to use. This example uses a saved search for `Customer` records with an internal id of `customsearch801`. 1. In the browser, navigate to the deployment record for the Mitto Saved Search RESTlet. `Customization -> Scripting -> Script Deployments`. Click `view` on the Mitto Saved Search RESTlet. 1. Click the URL. .. figure:: img/script-deployment.png :width: 7in Script Deployment Record 1. A new window will open and an error message will be displayed. .. figure:: img/error.png :width: 7in Error Message 1. In the window with the error, open the developer tools inspector: `Right-click -> Inspect`. 1. In the Inspector portion of the window, click `Network`. 1. In the Network Inspector, click `Reload`. .. figure:: img/inspector.png :width: 7in Network Inspector 1. The same error will appear again. Scroll to the top of the network traffic. The first row will have a status of `500`. This represents the GET that was issued when `Reload` was clicked. 1. We will modify this request and resend it. The response will contain the first block of data from our saved search. 1. Right-click on the first row and click `Edit and Resend` 1. In the `Method` box, replace `GET` with `POST`. 1. Scroll to the bottom of `Request Headers` and add a new line: ``` Content-Type: application/json ``` 1. Click in the `Request Body` section and add the following JSON content: ```json { "record_type": "Customer", "search_id": "customsearch801", "last_modified_column": "None", "internal_id": "1", "line_id": "None", "batch_size": "1000", "log_level": "DEBUG" } ``` The contents of the Request Body is passed to the Mitto Saved Search RESTlet. The values control the RESTlet's behavior. `record_type` and `search_id` must match the saved search that is to be used. The remaining key/value pairs are likely to be of limited use for debugging purposes; their functions are described the the [job configuration documentation](job_configuration_saved_search.md). 1. Your request should look like the one below. .. figure:: img/edit.png :width: 7in Edit and Resend 1. Click `Send`. A new line will appear at the bottom of the Network Inspector. I should have a status of `200` and a `Method` of `POST`. 1. Click the new line. In the section of the Inspector that opens on the right, click `Response`. .. figure:: img/results.png :width: 7in Response 1. The response containing JSON objects from the Mitto Saved Search will be displayed. The objects can be expanded to view their content.