Discussions
Join the NetSuite community to innovate, connect, and discover what’s next.
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Register now
Sample Script: RSS Portlet
RSS (Really Simple Syndication) feeds are essentially XML documents used for publishing content. For more information, please visit http://en.wikipedia.org/wiki/RSS_(file_format).
Netsuite supports RSS portlets standard out of the box but if you wanted to build your own (i.e. from multiple sources, or formatted slightly different) you can using the powerful nlapiRequestURL API and portlet scripts.
The following script makes an external request to an RSS source (in this case: http://rss.slashdot.org) in order to retrieve and display an RSS feed in a LINKS portlet. The APIs used are nlapiRequestURL() to fetch the RSS feed, nlapiStringToXML() to convert the feed into an XML document, and nlapiSelectNodes/nlapiSelectValue to query the XML document for the RSS data