cancel
Showing results for 
Search instead for 
Did you mean: 

Learning the webtools API / Netapoints api ...

Former Member
0 Kudos

I have hunted a bit for documentation for Webtools API in order to learn to use it.

Is there sample code that is available? I read there is a SDK folder which comes with the install but I could not find it. We are the reseller for it.

What I basically need to do is to write a custom OrderHistory web part (ascx) which will link up the order history based on Logged In UserID and not Account ID due to 2nd sync assigning the processed orders to the consolidated BP on the B1 side.

So I need to know who is logged in? I suppose I need to somehow talk to:

netpoint.api.account

And then based on the userid logged in, run a custom sql and display the data.

Thanks

Mike

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

The SDK folder should be in the zip file you download from SAP that has the installer.

There's not much sample code to go by ... the SDK folder has some and if you look in the plugins folder of the site you will see all these ascx files have the code in the ascx and not compiled in a dll so they can give you an idea of what you can do.

For you example, if you just want to get the currently logged in user in a user control (ascx) just add a "using netpoint.classes" at the top, create a new NPBasePage object by casting the current Page to NPBasePage "NPBasePage basePage = (NPBasePage)Page;" and then use the UserID property of the page (basePage.UserID).

Former Member
0 Kudos

That last post was very helpful and I also got the SDK folder and now I can see what I am supposed to do.

One last question is ... how do I use the current DB connection that exists? I will not be using the netpoint api in this case as I want to query the db on my own and I don't want to create my own separate connection.

OR should I just directly use the one in web.config called "connString"?

OR is there a best practice out there?

Thanks,

Mike

Former Member
0 Kudos

Hi Mike,

Here's a post of mine with some code that uses the existing DB connection. Hopefully it will give you some insight into using other netpoint API objects too.

[]