xTuple.com xTupleU Blog & News Customer Support

Calling a WebPage from Xtuple

I have an need to call a Web page from Xtuple I know this can be through documents under attachment. (which is still an option but I need to understand how to add a new document type). I can easily build a screen with a button that would get the field value and call the web site, but all of the research under Java Script will not work. Has anyone done this before? is even possible

A general idea would help.

Thanks
Charles

Charles,

The xtdesktop extension loads a web page into the main desktop client window, proving that this is possible.

Two questions:

  • What version of the xTuple desktop client is this for?
  • Do you need to open the page in a full-featured web browser or is it enough to open just the one page then close it again?

Gil

Tricky Question, this link will call the website to browse the link that user has entered which I believe is a web page they can review case information and change data/forms.

Desktop is 4.0.14 and version is 4.12

I had tried this
var _netmgr = new QNetworkAccessManager(mywindow);

var url = new QUrl("http://www.google.com"); 


// prepare the request    
var netrequest = new QNetworkRequest();
 netrequest.setUrl(url);

// fetch content of provided url using our network manager
_netmgr.get(netrequest);

Eek!

The QNetworkAccessManager and associated classes are for very low-level processing. We use that stuff for talking directly with web services, email servers, and the like.

You should use something higher level. Take a look at the dockWelcome script in the xtdesktop extension instead. It’s about 120 lines that I’ll summarize here.

The function initWelcome() sets up that particular page of the desktop. The associated UI has 3 buttons for basic web navigation. initWelcome() is called as the desktop client is starting up and does the following:

If you don’t need the buttons, the URL is simple, and you’re working with just one version of the xTuple desktop client, this can be done in 10-15 lines of code.

GIl

Great thanks for the direction, sometimes GOOGLE is dangerous!