Forum Discussion
Integrate PowerBI with Netsuite
You can embeded report with Javascript API, check Embedding Basics. However AFAIK, there's no way to get accesstoken in Javascript, you would have to get the token in backend(eg in C#) and pass it to the page.
I have no idea on Netsuite and not sure what you can do in it. Maybe ask the question how to integrate an C# app with Netsuite in the dedicated forum.
Hi, Eric
I'd like to ask you a few more questions.
As I metioned before, I'm integrating PowerBI with Netsuite.
I'd like to import Sales Order reports from NetSuite to PowerBI.
I think, the only way I can do this is to import sales order record one by one.
I tried to use PowerBI REST API before but I can't find solution.
PS: NetSuite only provide Javascript API so integration should be done only by Javascript. So I think C# is not solution.
Can you please give me some reference for it?
Please ask me any questions you might have.
Looking forward to hearing from you asap.
Sincerely,
Jin
- Eric_Zhang9 years agoMicrosoft Employee
Then my approach would be using Power BI Embedded, check Power BI emebedded VS Rest API.
- Import the records to powerbi desktop,design the report and upload it to a workspace. Regarding data refreshing, check this link.
- Generate an accesstoken that never expires(not recommended).
var embedToken = PowerBIToken.CreateReportEmbedToken(this.workspaceCollection, this.workspaceId, report.Id,Convert.ToDateTime("2099-12-31")); - Embed the report with PowerBI-Javascript. You can save the below sample in a html file and run in brower, my token in this test wouldn't expire before 2018 year.
<html>
<script src="https://microsoft.github.io/PowerBI-JavaScript/demo/bower_components/jquery/dist/jquery.js"></script>
<script src="https://microsoft.github.io/PowerBI-JavaScript/demo/bower_components/powerbi-client/dist/powerbi.js"></script>
<script type="text/javascript">
window.onload = function () {
var embedConfiguration = {
type: 'report',
accessToken: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2ZXIiOiIwLjIuMCIsIndjbiI6IndvcmtzcGFjZUNvbGxlY3Rpb240UEJJIiwid2lkIjoiYjVkMDJiYmItODcxNy00MmJlLWEzMTMtZDEyYTdmYzk0OTcyIiwicmlkIjoiMjlhNDcxNGYtYzQzMi00ZjEwLTk5ZTMtNzA1MzhmNGJlYmUwIiwiaXNzIjoiUG93ZXJCSVNESyIsImF1ZCI6Imh0dHBzOi8vYW5hbHlzaXMud2luZG93cy5uZXQvcG93ZXJiaS9hcGkiLCJleHAiOjE1MTQ2NDk2MDAsIm5iZiI6MTQ4MDAyOTQ4Nn0.GC1iQa1Xghkp9o4R87DcRjaLe9a0PBN7wxYOJKFDd5Y',
id: '29a4714f-c432-4f10-99e3-70538f4bebe0',
embedUrl: 'https://embedded.powerbi.com/appTokenReportEmbed?reportId=29a4714f-c432-4f10-99e3-70538f4bebe0'
};
var $reportContainer = $('#reportContainer');
var report = powerbi.embed($reportContainer.get(0), embedConfiguration);
}
</script>
<div id="reportContainer"></div>
</html>
- Anonymous9 years agoNot applicable
Check out our solution for this...
https://www.youtube.com/watch?v=dbOQDLZi1Xc&t=5s
e-mail me for more details
-Josh