Drill Back - Web URL

vmanojrc30
New Contributor III

Hi,

I have a user requirement to drill back to NetSuite Web URL from OS Cubeviews.In the NetSuite Web Page there are selection drop downs to select the Account, Customs and Time Periods. Based on the selection, detailed data will be retrieved from NetSuite and displayed in the NetSuite Webpage.

They would like to auto populate the NetSuite drop downs (Account, Customs and time) from the OS Stage data (Drill down data) and display the detailed data from NetSuite in the Webpage.

I understand we can drill back to the Web URL, however is it possible to auto populate the NetSuite drop downs from OS Drill Back option?

 

4 REPLIES 4

DanielWillis
Contributor III

OneStream can populate parameters into a URL and send a user there, e.g. "http://www.netsuite.com/something/myreport?Entity=ABC123&Product=Apples". The rest of the work is on the NetSuite side. If you can set up NetSuite (or more specifically, your report) to recieve those parameters then you're good. I'm sure you'd find details in the NetSuite docs and support forums of that part.

vmanojrc30
New Contributor III

Thanks for your response.I am checking whether Netsuite is compatible to accept the parameters in URL and render the report.

RobbSalzmann
Valued Contributor

I agree with @DanielWillis 's approach and would use the same.  The part of the url after the Question Mark (?) is called the Query String.  It is name value pairs seperated by Ampersands (&).  The job you have now is to look into the html of the NS webpage and find the form element names of the dropdowns you want to set the value in. 

Usually a dropdown will look like this:

<select id="account" name="account">
<option value="1">30000</option>
<option value="2">30001</option>
<option value="3">30002</option>
<option value="4">30003</option>
</select> 

You want the left side of the Equals(=) to have the Name of the select, account in this case, and the right side set to the value or option value of the account you want.

Here's the rub: The web page that receives the query must have code in it to receive the URL Query string and parse it to set the values in the page controls.

If you have access to code in the page, you can add JQuery to marshall your Query string into the right contol:

 

$(document).ready(function() {
  // Deconstruct the current browser URL
  var url = new URL(document.location);

  // Get query string
  var params = url.searchParams;

  // Get value of the account from the query string
  var acctVal = params.get("account");

  // Set the account as the value of the dropdown
  $("#account").val(acctVal );
});

 

 

 

 

vmanojrc30
New Contributor III

I have a follow-up question on this topic:

Is it possible to define the login credentials to access NetSuite URL within the connector BR or pass it via URL so that the NetSuite report open up without asking for the credentials during every drill back?

We have a generic user credentials to access NetSuite. We want to use that credential when accessing NetSuite report via OS Drill back. Currently the drill back to NetSuite Report open up the login web page asking for credentials.