This topic contains 6 replies, has 2 voices, and was last updated by Arun Reddy 4 years, 10 months ago.
-
AuthorPosts
-
May 3, 2017 at 2:04 pm #6410
cgunadi@nextcoder.comWhat I need to accomplish is:
Invoke a Netsuite Saved Report via API (SOAP? restlet?), and to be able to pass some parameter to the Report like the Start and End Date.
I need to get the Report result back in some text/XML/CSV/JSON/other format.
Is this possible to do in Netsuite/SuiteTalk?
If not what is the best workaround to accomplish the same thing?
I understand the Report has “Excel Web Query” option, but it doesn’t allow me to pass any parameter (start/end date) to the Report.
Thank you so much for any hints/pointer.
= Cancan Gunadi
This is a cached copy. Click here to see the original post. -
May 3, 2017 at 2:29 pm #6411
taylor@abptech.comThe easiest way to set this up is to use a RESTlet. The linked article (https://netsuite.custhelp.com/app/an…irst%20restlet) gives detail, but basically you do this:Create the RESTlet File and Add It to the File Cabinet
Create the RESTlet Script Record
Define RESTlet Deployment(s)The RESTlet file will need to contain the function that accepts the parameter. The attached file is actually a working example function named executeSavedSearchSN that accepts request as the parameter to the saved search called customsearch1521 and then outputs the results in sns (serial numbers).
Then, you need to access the RESTlet via whatever scripting language you are using external to Netsuite. I can’t help you there, but this article can: https://netsuite.custhelp.com/app/an…ail/a_id/24420. The results will be in json format.
Good luck!
Attached Files
restlet.zip
(626 Bytes, 1 view)
-
January 8, 2020 at 5:22 am #26127
Hi
Thank you for the answer. But for some reason I am not able to see the file. Is there some place where I can get this sample file from?
-
-
May 4, 2017 at 5:35 am #6412
Olivier Gagnon NCReports cannot be returned as anything else than HTML. So in theory you could invoke the page and consumed the results, but you’ll be parsing through HTML that really isn’t meant to be parsed.
Typically, you would build a Saved Search that returns the same data the report has (more or less) and then just consume that. Is that not an option?
-
May 4, 2017 at 10:32 am #6413
cgunadi@nextcoder.comThank you both for the pointers.
I will look into the example.
Olivier,
As far as Saved Search is concerned, can it really replicate the result from a search, for example a “Sales by Customer Summary Ranked By Total Sales” report ?
-
May 4, 2017 at 10:40 am #6414
Olivier Gagnon NCYes, rather easily in that particular case.
-
May 5, 2017 at 12:10 pm #6415
cgunadi@nextcoder.comHi Olivier and all,
I’ve created a simple Saved Search which just returns me Customer List for now.
And I tried to use the “search” SOAP API and pass it a “CustomerSearchAdvanced”.
But no matter what I did, I keep getting “Invalid account number” error.
In that same program I could call the “login” function ok via SOAP API, where I gave the correct Application ID and my login credential.
The Application/Integration is created within the correct Account.
Do you or anyone know what could go wrong?
The Netsuite user account I used has Admin Role and a Web Service Role (a new Role that has the Web Service access enabled).
Is there anywhere else I need to set permissions ?
Thank you for any pointer.
delilahruch replied on 05/25/2017, 09:16 AM: Hi there,
Were you able to figure this out? I am trying to work on a way for a group of contracted representatives to search for customers and need to set up exactly what’s described above.
Delilah
-
AuthorPosts
You must be logged in to reply to this topic.