How to find ‘Last SQL Query Run’ behind a Oracle Netsuite application

Lets Say, I navigate as below

Bill Transaction page ->Related records -> Payments

How can I get a Last Query Run details ? I need a SQL query that ran at background to produce the results on Oracle Netsuite frontend, is there a way I can get it ?

How to find 'Last SQL Query Run' behind a Oracle Netsuite application

Rookie Asked on November 29, 2023 in Billing.
Add Comment
1 Answer(s)

Unfortunately, NetSuite doesn’t directly expose the SQL queries that run behind the scenes to generate the results you see in the UI. This means you can’t access the exact query that was run for the Payments list you see after navigating from the Bill Transaction page -> Related records -> Payments.


However, there are a couple of workarounds you could try:


1. Use SuiteQL:


SuiteQL is a SQL-like query language that allows you to access NetSuite data directly. You can use SuiteQL to write your own queries to retrieve the Payments data you’re interested in. While it won’t be the exact same query that was run, you can achieve similar results and potentially even gain more flexibility.


Here’s how you could approach this:

    • Identify the relevant tables and fields involved in displaying the Payments list. You can do this by exploring the NetSuite UI and related records, and checking field names and record types.


    • Use SuiteQL to write a query that joins these tables and filters based on the Bill Transaction you’re interested in. You can also include sorting and pagination if needed.


    • Run your SuiteQL query using SuiteAnalytics Connect, the N/query module in SuiteScript, or SuiteTalk REST web services.



2. Leverage browser developer tools:


Modern browsers offer developer tools that can capture network traffic and potentially reveal the underlying queries being made. Here’s how you could try this:

    • Open the Payments list in your browser.


    • Right-click and select “Inspect” (or similar option depending on your browser) to open the developer tools.


    • Go to the “Network” tab and look for requests happening around the time the Payments list is populated.


    • Identify a request that seems related to fetching the Payments data based on the URL, headers, or payload.


    • Analyze the request details, including headers and response data. Sometimes, you might find clues about the underlying SQL query in the request parameters or response structure


Beginner Answered on December 5, 2023.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Become a Sponsor   Become a Sponsor