TexasSwede
texasswede@gmail.com
  • About this blog
  • My Website
  • My Resume
  • XML Export Tool
  • Photos

CollabSphere 2019 – Submission deadline is closing soon!

Posted on August 17, 2019 by Karl-Henry Martinsson Posted in #DominoForever, #IBMChampion, CollabSphere, Community, HCL, IBM/Lotus, Notes/Domino, Sametime, Verse, Web Development Leave a comment

CollabSphere_2019

The deadline to submit an abstract for sessions at CollabSphere 2019 is tomorrow, Sunday August 18. If you want to speak at the conference, you don’t have much time to act.

So why would you like to speak at CollabSphere? Perhaps your reason is the same as mine was when I started speaking at conferences: I wanted to give back to the community from which I had learned so much over the years. I wanted to share my knowledge with other developers, and perhaps inspire them by showing what could be done with Notes and Domino.

What if you are afraid of public speaking? That is absolutely normal. With practice you get more used to it, and one place where you can practice it in a safe and encouraging environment is at Toastmasters, an international organization focused on public speaking and leadership. There are local Toastmasters clubs all over the world, and you can join at any time.

Even if you are not speaking, you can still register to attend the conference. This year it is held in Boston, close to the HCL office in Chelmsford, and we can expect a lot of exciting news about Notes and Domino 11 (which is due in the end of the year), and perhaps even about Domino 12. This is a can’t-miss conference!

HCL Software Creates Portal for Customers and Partners

Posted on July 2, 2019 by Karl-Henry Martinsson Posted in Community, HCL, IBM/Lotus, Notes/Domino, Sametime, Verse Leave a comment

HCL_Software_PortalHCL Software today launched a brand new portal for customers and partners. HCL Software is a part of HCL Technologies, and this new division was announced as late as yesterday (June 1, 2019) at the same time as HCL announced that the purchase of IBM’s collaboration products had been completed.

The new portal is built using Domino and Portal, and provides customers and partners a place where they can receive product information, learn about purchasing software, get support, connect with partners, and much more.

If you are a customer of IBM Notes, Domino, Sametime, Verse or Connections, or if you are a Business Partner, go to http://bit.ly/mlnHCLw3 and sign up. At the moment the sign-up is disabled, due to the acquisition. But I would suggest to check back in a few days.

#dominoforever #IBMChampion

The deal is done: HCL takes over Notes, Domino, Connections and more

Posted on July 1, 2019 by Karl-Henry Martinsson Posted in #DominoForever, Domino 11, HCL, IBM/Lotus, Notes/Domino, Sametime, Verse Leave a comment

Today the announcement we have been waiting for arrived. HCL and IBM closed the acquisition that was announced back in December. HCL now owns (among other products) the collaboration products Notes, Domino, Sametime, Verse and Connections.

As part of the deal’s close, HCL takes full ownership of the research and development, sales, marketing, delivery, and support for AppScan, BigFix, Commerce, Connections, Digital Experience (Portal and Content Manager), Notes Domino, and Unica.

HCL is also formally introducing HCL Software, a new division that will operate this enterprise software product business and meet customer demand. A Business Unit of “Products and Platforms” (Mode 3), HCL Software has successfully delivered more than 340 partner releases and more than 90 HCL releases, including such popular products as Informix 14.10, Domino 10, Workload Automation 9.5. The division aspires to reshape the enterprise software business, focused on innovation and cutting-edge delivery for customer success.

Read the full announcement at http://bit.ly/HCLSoftware. 

Over the last few months we have seen a number of IBM:ers who has been working with the collaboration products move over to HCL. In the last few days we have seen even more people at IBM announce their moves to HCL, including Mat Newman who will become Director of HCL Digital Solutions, Asia Pacific and Stephan Wissel, the new Solution Director at HCL PnP.

As a developer, it is very exciting and encouraging to see that Maureen Leland, who was in charge of Domino Designer for over a decade and have been with Lotus, Iris and now IBM since 1992, is now at HCL. Security expert Dave Kern is also moving to HCL, as is Wes Morgan, Adam Gartenberg and many others. The fact that HCL is bringing over all the brilliant minds from IBM is also encouraging. The investments in Notes and Domino that HCL already has made should show everyone that they see the products for what they are, amazing technologies and products that were decades ahead of the competitors. Just the other day (June 18, 2019), Mongo DB announced field level encryption. This is a feature Notes and Domino has had since day one, 30 years ago…

I believe the future for Notes, Domino, Sametime and Connections is very bright. The developers are ecstatic that they finally get to implement new features, make improvements and even bring the Notes client to mobile devices (iPad, iPhone and Android). We have already seen some great things come from HCL, like the new Domino Query Language created by John Curtis, as well as the node.js integration.

I cannot wait to see what HCL will deliver in the future. Notes and Domino 11 is planned already for the end of this year.

 

Call 32-bit COM Objects from 64-bit Domino

Posted on June 28, 2019 by Karl-Henry Martinsson Posted in #DominoForever, AppDev, IBM/Lotus, Microsoft, Notes/Domino, Programming 2 Comments

We all know that when you upgrade your Domino environment from 32-bit to 64-bit, any COM objects you use will not work anymore. You thn need to get and install a 64-bit version of the COM object.

But what if there is no 64-bit version? Do you have to stay on 32-bit Domino forever? Or rather, stay on Domino 9.x, since Domino 10 (and probably also the upcoming version 11) are 64-bit only.

Perhaps not. I found this article that describes how to use a 32-bit COM object in a 64-bit environment, like Domino 10. I have not had time to test it myself, but I will probably try it this weekend.

Read all the details at https://techtalk.gfi.com/32bit-object-64bit-environment/.

Microsoft Flight Simulator – It will be back!

Posted on June 28, 2019 by Karl-Henry Martinsson Posted in Uncategorized 6 Comments

I am not a gamer, but there are a couple of games I do enjoy. One of them is Microsoft Flight Simulator, which I have been playing since 1988 or so. Yes, since version 3.0 for PC.

With each version it became more and more realistic looking, you could even buy third-party maps that used satellite images. I was able to fly over my house and identify it. The graphics was good, but not spectacular compared to the games of today. Then in 2009 Microsoft closed down the studio that had been developing the game, to the big upset of the flight sim community. The last version, Flight Simulator X (version 10) was to be the last.

There are a couple of alternatives today, the two major ones are X-Plane and DCS World. I recently started looking at DCS World, and it is pretty impressive. It also supports Virtual Reality headsets out-of-the-box. The game itself is free, you get a couple of airplanes and one region where you can fly. You then purchase the planes and regions you like, over time. The graphics in the game is stunning.

Recently, during the E3 trade show, Microsoft announced that there will be a new version of Flight Simulator in 2020. A 4K video was shown, and the graphics is amazing. The terrain is generated from satellite images, and the environment (ground vehicles, animals on the ground, etc) are controlled by AI. Looking at the video, the graphics is way ahead of anything I have seen.

I really hope Microsoft will be able to deliver, and that it really will be available in the end of 2020. I have been planning to build a new computer for a while, but now I will probably hold off until closer to the Flight Simulator release, in order to get the best and newest components. I have a feeling the game will use every ounce of power available for this level of realism.

CollabSphere 2019 – Registration and Call for Abstracts

Posted on June 11, 2019 by Karl-Henry Martinsson Posted in Uncategorized Leave a comment

The registration for CollabSphere in Boston this fall is now open. This conference, formerly known as MWLUG, is a great opportunity to learn more about the future of the IBM/HCL Collaboration products (Notes, Domino, Sametime, Connections, and more) directly from the product managers and executives at HCL. When CollabSphere takes place on October 28 to 30, the HCL acquisition of the products should have taken place, but you will still see many familiar faces on stage and at the round-table discussions, as a large number of IBM:ers followed the products over to HCL. This is obviously a sign that they belive in the future of the collaboration tools under HCL’s control.

In addition there will be many other sessions from business partners and customers, where you will learn the latest and greatest, as well as best practices, for everything related to the platforms. I have attending MWLUG and CollabSphere for several years, and the sessions are always top notch. Not only do I always learn new things, I also get inspired and energized to do new things with Notes and Domino.

This is also a great opportunity to network, both with HCL executives, product managers and developers, and with other customers and business partners.

The cost of the conference is only $100, which is a steal if you look at what you get. Most of the cost for the conference is covered by sponsors.

If you want to share your knowledge at CollabSphere, the call for abstracts is also open now. Submit your session, and perhaps you get to present to your peers in Boston in the end of October!

I hope to see you in Boston!

Run Notes applications on iPad!

Posted on April 27, 2019 by Karl-Henry Martinsson Posted in #DominoForever, Formula, HCL, IBM/Lotus, Lotusscript, Notes/Domino Leave a comment

IBM and HCL has released an amazing product, IBM Domino Apps for iPad. They have been showing early versions at IBM Think and other events for the last year, but now it is here, and you can download it in the Apple App Store!

I have seen earlier versions of the product, and I have to say that the developers at HCL did an excellent job. Your existing Notes applications can now run right out of the box with full fidelity and functionality, including formula language and Lotusscript, with no changes needed.

Even features like replication to a local database and working offline works. It is simply a full Notes application client for the iPad.

This is something that people have been asking IBM to develop for at least a decade. And finally we have it available.

There is a version for Android in the works as well, but no official release date has been set for it yet.

So what does this mean? It means that not only can you run your current applications on an iPad, you can develop new applications specifically for tablets. The applications can be styled to work better on tablets, for example larger fonts and buttons. HCL even added some tablet specific functions, like camera integration, to the core Notes functionality.

There are a couple of limitations in the first versions, most notable that there is no support for the mail template, and no support for Xpages in the Notes client.

If you are using Notes and have users with iPads, install IBM Domino Apps for iPad and be prepared to be amazed!

#IBMChampion

HCL has impressed me!

Posted on April 3, 2019 by Karl-Henry Martinsson Posted in AppDev, Domino 11, HCL, IBM/Lotus, Notes/Domino Leave a comment

It has now been just over four months since it was announced that HCL would purchase the IP (intellectual property) of Notes, Domino, Sametime, Connections, Verse, Traveler, and several other products from IBM.

When the announcement was made in 2017 that HCL would take over development and support of Notes and Domino, many IBM:ers with long experience of developing the products moved over to HCL. I talked to several of them back then, and also at the Factory Tour in July 2018. The excitement was amazing to see, it took me back to the days of Lotusphere in the early 2000’s. They were all very excited about the new opportunity to create new functions and expand/modernize the products. Very quickly the development of Domino 10 took off.

Another thing that impress me is how HCL seeks feedbacks from customers and business partners. Even as HCL is hiring on a large number of new developers, there are still limitations on what they can accomplish. It is very clear that they want to build a product for the customers, and they need to know where to focus their development efforts.  HCL and IBM held a number of jams during the first half of 2018, both online and physically around the world, where customers and business partners could give feedback on functionality and priorities.

On October 10, 2018 Domino 10 was released, with many of the improvements requested implemented. Some additional functions, like the support for node.js, were released a few months later.  I think the decision not to rush out everything is the right one. As a developer, I want all the functions right now, or even better yesterday. But at the same time, I want it to work properly. HCL has done a good job at balancing this, at least this far. I want HCL to continue working this way.

The development of Notes and Domino 11 has already started. As a matter of fact, HCL started working on that version even before Domino 10 was released. Several Domino 11 jams have been taking place already, withmore to come. Version 11 will focus on the client, while version 10 had the focus on the server and development functionality. But we developers have things to look forward to in Notes 11 as well.

One of the items IBM and HCL have been talking about is low-code/no-code rapid development. This is something that we are promised to be available in Domino 11, as a browser-based development environment. It would bring the power of Notes and Domino development back to the “citizen developers”, allowing regular business users to be able to build custom applications/solution without writing any code. This used to be a strength of Notes in earlier versions, but in the late 1990’s IBM moved the development functions from the regular Notes client into a separate IDE, Domino Designer. This took away the ability for regular users to build their own solution, and made them have to rely on the IT department or dedicated developers to build applications. Bringing this back would give a new generation of users access to this powerful platform.

I think it is very important that the new low-code development functionality work seamlessly with traditional Domino development, like HCL is aiming for. Imagine a user in the accounting department who comes up with an ide for an application that would improve their efficiency. The user begins to build a simple application using the Domino low-code/no-code environment. Perhaps a form or two, some simple views and a simple workflow. The development is done in a sectioned off part of the server, as the regular users don’t have access to create database/applications in the general Domino data location. Data is then loaded though an import from an Excel spreadsheet,

When the first iteration of the application is done, the user shows the result to the CFO, who loves it. But there are a couple of functions that would be nice to have, like integration with another, existing Domino application. This is something that the IT department and their developers need to handle. So the application is handed over to them. IT takes a look at the application, and either leaves it in the end-user area on the server or move it over to the general data storage. The assigned developer then opens up Domino Designer or perhaps even Visual Studio Code, and add the code needed. The developer only spends a fraction of the development time previously needed, as the end user already built much of the infrastructure of the application. Another benefit is that the developer does not need to collect requirements for how the full application needs to work, only the small part they are modifying/adding.

The application is updated, and the users can start using it. The IT manager is happy, as the developer only spent an hour or two on the project instead of a couple of days, and can now be moved on to the next project. The CFO and end-users are happy because they got their application built quickly, without having to wait for IT to get the bandwidth to develop a complete application, and they can improve their efficiency and get more done quicker.

If HCL can deliver a low-code/no-code solution like this, perhaps with data storage not only in Domino .NSF files but also with connections to other data stores like perhaps SQL and Mongo DB, this could be an amazing collaborative development platform, where end-users and professional developers work together on improving the application landscape of their company.

I can’t wait to see what HCL delivers later this year!

 

 

 

#dominoforever #IBMChampion

We live in interesting times.

Posted on December 7, 2018 by Karl-Henry Martinsson Posted in App Modernization, Connections, IBM/Lotus, Notes/Domino, Sametime, Verse 1 Comment

Yesterday it was announced that HCL Technologies will purchase the IP (intellectual property) of seven IBM-owned products, including Notes/Domino, Sametime and Connections, for a total of 1.8 billion dollar.

HCL and IBM already had a partnership on the product development side, with HCL doing the development and support with IBM still owning the products and handling sales and marketing. Now HCL is fully in charge of the product, and is not tied down by what IBM decides.

As soon as the HCL-IBM agreement was announced last year, HCL aggressively went on the offensive. They announced not one but two additional versions of Notes and Domino. Domino 10 was delivered just two months ago, and version 11 is promised in 2019.

HCL reached out to business partners and IBM Champions, as well as to the rest of the user community, to get feedback about what features were the most critical. Despite the quick release of Domino 10, a number of suggested features were included, as were several other impressive improvements.

Notable among these features is the new (and extremely fast) Domino Query Language as we as support for node.js through the domino-db module. On the administration side there were several improvements that will lower the TCO (total cost of ownership).

HCL has already announced several so called Jams in the near future to collect feedback on what the users want to see in the upcoming Domino 11.

So what does yesterday’s announcement mean for the future of Notes, Domino and Connections? I belive it will be extremely beneficial. HCL can take the products where they want them, adding functions requested by small and medium sized businesses instead of focusing on what a few very large customers wants, which is what IBM seemed to do.

By adding back low-code/no-code development into the core product, the citizen developers can again be engaged to create simple applications for their own or their department’s use. If they then need more advanced functions they can hand the application over to a traditional developer for further enhancements. This is what Notes looked like in the beginning, back in the early to mid 90’s. This is the strength of the platform, and what brought it its success.

The weakness of Notes and Domino has always been IBM:s (seemingly) lack of understanding of the product, and how it fits smaller and medium sized businesses. By going back to the original use of Domino, combined with HCL:s focus on on-premises (as opposed to IBM:s attempt to move everything to the cloud, despite what the customers want), I think HCL can bring a new life to Notes and Domino, and combine Collaborations into the mix. I can see an upcoming release of Collaboration where the data lives in a Domino database.

So for any Domino and Connections customers and business partners, I think the future looks bright. My belief is that HCL will bring new life and new functionality into the products.

#domino2025 #dominoforever #IBMChampion

Free Code – Wrapper for searches in NetSuite

Posted on November 24, 2018 by Karl-Henry Martinsson Posted in Javascript, NetSuite, Programming, SuiteScript Leave a comment

About a year ago I wrote a SuiteScript 1.0 class as a wrapper around the search functionality in NetSuite. I have updated the code over time, and I want to share the latest version. Among the new features is support for formulas and search expressions. The class should be backwards compatible with the original version, but in addition you can also pass an object to most functions, instead of passing separate parameters. This makes it more flexible and allows me to add more functionality.

Enjoy!

 

/**
 * Encapsulate NetSuite search functionality in an easy-to-use object for SuiteScript 1.0.
 *  
 * Version    Date            Author           Remarks
 * 1.0        11 Nov 2016     kmartinsson      Initial version
 * 1.5        06 Jul 2017     kmartinsson      Added record type to constructor
 * 2.0        23 Aug 2017     kmartinsson      Added Search2 function, with support for objects and adding multiple columns/filters
 * 2.0.1      01 Sep 2017     kmartinsson      Bug-fixes
 * 2.0.2      01 Sep 2017     kmartinsson      Fixed issue with join not being null, added hasOwnProperty check 
 * 3.0        20 Nov 2017     kmartinsson      Removed v1.x code stream, renamed Search2 to Search
 * 3.0.1      06 Dec 2017     kmartinsson      Added JSDoc style comments, updated comments to new JSDoc style
 * 3.0.2      28 Feb 2018     kmartinsson      Fixed bug in sort key which prevented proper sorting. Added alternative keys.
 * 3.0.3      15 Jul 2018     kmartinsson      Added filter expression support
 * 3.0.4      01 Oct 2018     kmartinsson      Added method removeColumns() for use on (external) saved search
 * 
 */

/**
 * Search object
 * @constructor
 * @param {string} recordtype - Optional NetSuite recordtype (internalid)
 */
function Search(recordtype) {
    this.recordType = null;
    this.columns = [];
    this.filters = [];
    this.filterExpressions = [];
    // Set internal id of saved search to null
    this.internalId = null;
    this.noSavedColumns = false;
    // If record type/ID is supplied, set it now, otherwise default to null
    if (recordtype != null && recordtype != "") {
        this.recordType = recordtype;
    }

    // Helper function to verify the value is empty or null
    function isNullOrEmpty(val) {
        if (val == null || val == '' || val ==[] || val == {}) {
            return true;
        } else {
            return false;
        }
    }

    
    /**
     * Remove all columns included in the search
     * @param none
     * 
     */
    this.removeColumns = function() {
        this.noSavedColumns = true;
    }

    /**
     * Add a column to include in the search
     * @param {object}|{string} column - Object specifying a column to return or string containing columnId
     * @param {string} join - Joined record (internalid) (optional)
     * @param {boolean}|{string} sorting - Sorting (optional)
     *         Options: true = descending, false = ascending, empty/null = no sorting, "yes" (ascending), 
     *         "no", "ascending", "descending" (can be abbreviated "a" and "d" respectively).
     */
    this.addColumn = function(column, join, sorting) {
            var nsSearchColumn = null;
            var paramColName = null;
            var paramJoin = null;
            var paramSummary = null;
            var paramSorted = null;
            // Check if first argument is string or object
            if (typeof column == "string") {
                paramColName = column;
                // Check if second argument is null (for no join)
                if (isNullOrEmpty(join)) {
                    paramJoin = null;
                    // Check if arguent for sorting was provided
                    if (!isNullOrEmpty(sorting)) {
                        paramSorted = sorting;
                    }
                } else {
                    // Check if second argument is boolean, then it is not 'join' but 'sorting'
                    if (typeof join == "boolean") {
                        paramSorted = join;
                        paramJoin = null;
                    } else {
                        paramSorted = sorting;//sorted;
                        paramJoin = join;
                    }
                }
                // Now paramJoin and paramSorted are assigned properly
                if (typeof paramSorted == "boolean") {
                    if (paramSorted == true) {
                        paramSorted = "des";
                    } else {
                        paramSorted = "asc";
                    }
                } else if (typeof paramSorted == "string") {
                    // Get first character of string, in lower case
                    var tmp = paramSorted.slice(0, 1).toLowerCase();
                    // y = ascending sorting, n = no sorting, a = ascending, d = descending
                    if (tmp == 'y' || tmp == 'a') {
                        paramSorted = "asc";
                    } else if (tmp == 'd') {
                        paramSorted = "des";
                    } else {
                        paramSorted = null;
                    }
                }

            } else {
                if (column.hasOwnProperty("name") && column.name != null) {
                    paramColName = column.name;
                } else if (column.hasOwnProperty("columnName") && column.columnName != null) {
                    paramColName = column.columnName;
                } else if (column.hasOwnProperty("columnname") && column.columnname != null) {
                    paramColName = column.columnname;
                } else if (column.hasOwnProperty("column") && column.column != null) {
                    paramColName = column.column;
                } else {
                    throw nlapiCreateError('search.addColumn() - Required Argument Missing', 'The required argument <em>columnName</em> is missing. This argument is required.<br>Received: ' + JSON.stringify(column));
                }
                if (column.hasOwnProperty("join") && column.join != null) {
                    paramJoin = column.join;
                }
                if (column.hasOwnProperty("summary") && column.summary != null) {
                    paramSummary = column.summary;
                }
            }
            nsSearchColumn = new nlobjSearchColumn(paramColName, paramJoin, paramSummary);
            // Check if 'sorted' value exists in object
            if (column.hasOwnProperty("sorted") && column.sorted != null) {
                // Get first 3 characters as lower case
                paramSorted = column.sorted.toLowerCase().substring(0, 3);
            } else if (column.hasOwnProperty("sorting") && column.sorting != null) {
                // Get first 3 characters as lower case
                paramSorted = column.sorting.toLowerCase().substring(0, 3);
            } else if (column.hasOwnProperty("sort") && column.sort != null) {
                // Get first 3 characters as lower case
                paramSorted = column.sort.toLowerCase().substring(0, 3);
            }
            if (paramSorted!= null && paramSorted!="") {
                if (paramSorted == "asc") {
                    nsSearchColumn.setSort(false);
                } else if (paramSorted == "des") {
                    nsSearchColumn.setSort(true);
                } else {
                }
            }
            // Check if 'formula' value exists in object, then add to column object
            if (column.hasOwnProperty("formula") && column.formula != null) {
                nsSearchColumn.setFormula(column.formula);
            }
            // Check if 'functionId' value exists in object, then add to column object
            if (column.hasOwnProperty("functionId") && column.functionId1 != null) {
                nsSearchColumn.setFunction(column.functionId);
                // Push new nlobjSearchColumn into array
            }
            // Check if 'label' value exists in object, then add to column object
            if (column.hasOwnProperty("label") && column.label != null) {
                nsSearchColumn.setLabel(column.label);
            }
            this.columns.push(nsSearchColumn);
            return nsSearchColumn;
        } // end function addColumn


    /**
     * Add multiple columns to include in the search
     * @param {array} columns - array of column objects
     */
    this.addColumns = function(columns) {
            for (var i = 0; i < columns.length; i++) {
                this.addColumn(columns[i]);
            }
        } // end function addColumns

    /**
     * Add a search filter
     * @param {object}|{string} filter - filter object or string containing fieldId
     * @param {string} fieldJoinId - field to use for join (optional)
     * @param {string} operator - operator for filter (optional)
     * @param {string} value - value to filter for (optional)
     */
    this.addFilter = function(filter, fieldJoinId, operator, value) {
            if (typeof filter == "object") {
                var obj = filter;
                var fieldId = obj.field;
                var fieldJoinId = null;
                if (filter.hasOwnProperty("join")) {
                    fieldJoinId = obj.join;
                }
                var operator = obj.operator;
                var value = obj.value;
                // Create filter object
                var nsSearchFilter = new nlobjSearchFilter(fieldId, fieldJoinId, operator, value);
                // Check if 'formula' value exists in object, then add to filter object
                if (obj.hasOwnProperty("formula") && obj.formula != null) {
                    nsSearchFilter.setFormula(obj.formula);
                }
                // Check if 'functionId' value exists in object,then add to filter object
                if (obj.hasOwnProperty("functionId") && obj.functionId != null) {
                    nsSearchFilter.setFunction(obj.functionId);
                }
                this.filters.push(nsSearchFilter);
            } else {
                var fieldId = filter;
                this.filters.push(new nlobjSearchFilter(fieldId, fieldJoinId, operator, value));
            }
        } // end function addFilter


    /**
     * Add multiple search filters
     * @param {array}filters - array of filter objects
     */
    this.addFilters = function(filters) {
            for (var i = 0; i < filters.length; i++) {
                this.addFilter(filters[i]);
            }
        } // end function addFilters

    /**
     * Add filter expression
     * @param {array} expression - array structure describing search expression
     */
    this.addFilterExpression = function(expression) {
        this.filters.push(JSON.parse(expression));
    }

    /**
     * Set filter expression - Replaces any existing filters
     * @param {array} expression - array structure describing search expression
     */
    this.setFilter = function(filterArray) {
        this.filters = filterArray;
    }
    
    /**
     * Set the type of record to search for
     * @param {string} type - internalid of record type to search for
     */
    this.setRecordType = function(type) {
            this.recordType = type;
        } // end function setRecordType


    /**
     * Use an existing saved search as starting point for this search
     * @param {string} internalid - internalid of existing saved search
     */
    this.useSavedSearch = function(internalid) {
        if (!isNullOrEmpty(internalid)) {
            this.internalId = internalid;
            // If internal id of a saved search is provided, load that saved search
            this.savedsearch = nlapiLoadSearch(this.recordType, this.internalId);
        }
    } // end function useSavedSearch


    /**
     * Return search results as a nlobjSearchResult object
     * @param {string} recordtype - Optional NetSuite recordtype (internalid)
     */
    this.getResults = function(recordtype) {
            var results = [];
            if (recordtype != null && recordtype != "") {
                this.recordType = recordtype;
            }
            if (this.internalId != null) {
                // If internal id of a saved search is provided, load that saved search
                var savedsearch = nlapiLoadSearch(this.recordType, this.internalId);
                // Add new filters to saved search filters
                var newfilters = savedsearch.getFilters().concat(this.filters);
                // If existing columns in saved search should not be use, replace then
                var newcolumns = [];
                if (this.noSavedColumns) {
                    savedsearch.setColumns(this.columns);
                    newcolumns = this.columns;
                } else {
                    // Add new columns to saved search columns
                    newcolumns = savedsearch.getColumns().concat(this.columns);
                }
                // Perform the search
                var newsearch = nlapiCreateSearch(savedsearch.getSearchType(), newfilters, newcolumns);
                // 
            } else {
                // Otherwise build the search ad-hoc and set columns and filters
                var newsearch = nlapiCreateSearch(this.recordType, this.filters, this.columns);
            }
            var resultset = newsearch.runSearch();
            // Loop through the search result set 900 results at a time and build an array
            // of results. This way the search can return more than 1000 records.
            var searchid = 0;
            do {
                var resultslice = resultset.getResults(searchid, searchid + 900);
                for (var rs in resultslice) {
                    results.push(resultslice[rs]);
                    searchid++;
                }
            } while (resultslice != null && resultslice != undefined && resultslice.length >= 900);
            return results;

        } // end function getResults

} // end class search
#freecode #netsuite

Stack Exchange

profile for Karl-Henry Martinsson on Stack Exchange, a network of free, community-driven Q&A sites

Recent Posts

  • Domino 14 is now available
  • Domino 14 Early Access Program
  • Announced: Engage 2024
  • Integrate Node-RED with Notes and Domino
  • Notes and Domino v12 is here!

Recent Comments

  • Theo Heselmans on Announced: Engage 2024
  • Lotus Script Multi-thread Message Box [SOLVED] – Wanted Solution on ProgressBar class for Lotusscript
  • Viet Nguyen on Keep up with COVID-19 though Domino!
  • Viet Nguyen on Keep up with COVID-19 though Domino!
  • Mark Sullivan on Looking for a HP calculator? Look no further!

My Pages

  • How to write better code in Notes

Archives

  • December 2023 (1)
  • October 2023 (2)
  • September 2023 (1)
  • June 2021 (1)
  • April 2021 (2)
  • March 2021 (1)
  • August 2020 (3)
  • July 2020 (2)
  • April 2020 (2)
  • March 2020 (1)
  • December 2019 (2)
  • September 2019 (1)
  • August 2019 (2)
  • July 2019 (2)
  • June 2019 (3)
  • April 2019 (2)
  • December 2018 (1)
  • November 2018 (1)
  • October 2018 (5)
  • August 2018 (2)
  • July 2018 (3)
  • June 2018 (2)
  • May 2018 (1)
  • April 2018 (2)
  • March 2018 (1)
  • February 2018 (2)
  • January 2018 (4)
  • December 2017 (3)
  • November 2017 (2)
  • October 2017 (2)
  • September 2017 (1)
  • August 2017 (2)
  • July 2017 (6)
  • May 2017 (4)
  • February 2017 (1)
  • January 2017 (2)
  • December 2016 (2)
  • October 2016 (3)
  • September 2016 (4)
  • August 2016 (1)
  • July 2016 (2)
  • June 2016 (2)
  • May 2016 (3)
  • April 2016 (1)
  • March 2016 (4)
  • February 2016 (2)
  • January 2016 (4)
  • December 2015 (3)
  • November 2015 (2)
  • October 2015 (1)
  • September 2015 (2)
  • August 2015 (1)
  • July 2015 (5)
  • June 2015 (2)
  • April 2015 (2)
  • March 2015 (3)
  • February 2015 (2)
  • January 2015 (10)
  • December 2014 (1)
  • November 2014 (3)
  • October 2014 (3)
  • September 2014 (13)
  • August 2014 (6)
  • July 2014 (5)
  • May 2014 (3)
  • March 2014 (2)
  • January 2014 (10)
  • December 2013 (5)
  • November 2013 (2)
  • October 2013 (5)
  • September 2013 (4)
  • August 2013 (7)
  • July 2013 (3)
  • June 2013 (1)
  • May 2013 (4)
  • April 2013 (7)
  • March 2013 (8)
  • February 2013 (9)
  • January 2013 (5)
  • December 2012 (7)
  • November 2012 (13)
  • October 2012 (10)
  • September 2012 (2)
  • August 2012 (1)
  • July 2012 (1)
  • June 2012 (3)
  • May 2012 (11)
  • April 2012 (3)
  • March 2012 (2)
  • February 2012 (5)
  • January 2012 (14)
  • December 2011 (4)
  • November 2011 (7)
  • October 2011 (8)
  • August 2011 (4)
  • July 2011 (1)
  • June 2011 (2)
  • May 2011 (4)
  • April 2011 (4)
  • March 2011 (7)
  • February 2011 (5)
  • January 2011 (17)
  • December 2010 (9)
  • November 2010 (21)
  • October 2010 (4)
  • September 2010 (2)
  • July 2010 (3)
  • June 2010 (2)
  • May 2010 (3)
  • April 2010 (8)
  • March 2010 (3)
  • January 2010 (5)
  • November 2009 (4)
  • October 2009 (7)
  • September 2009 (1)
  • August 2009 (7)
  • July 2009 (1)
  • June 2009 (4)
  • May 2009 (1)
  • April 2009 (1)
  • February 2009 (1)
  • January 2009 (3)
  • December 2008 (1)
  • November 2008 (1)
  • October 2008 (7)
  • September 2008 (7)
  • August 2008 (6)
  • July 2008 (5)
  • June 2008 (2)
  • May 2008 (5)
  • April 2008 (4)
  • March 2008 (11)
  • February 2008 (10)
  • January 2008 (8)

Categories

  • AppDev (10)
  • Blogging (11)
    • WordPress (5)
  • Design (5)
    • Graphics (1)
    • UI/UX (2)
  • Featured (5)
  • Financial (2)
  • Food (5)
    • Baking (3)
    • Cooking (3)
  • Generic (11)
  • History (5)
  • Hobbies (10)
    • LEGO (4)
    • Photography (4)
  • Humor (1)
  • IBM/Lotus (178)
    • #Domino2025 (14)
    • #DominoForever (8)
    • #IBMChampion (46)
    • Administration (7)
    • Cloud (7)
    • CollabSphere (9)
    • Community (49)
    • Connect (33)
    • ConnectED (12)
    • Connections (3)
    • HCL (15)
    • HCL Master (1)
    • IBM Think (1)
    • Lotusphere (46)
    • MWLUG (25)
    • Notes/Domino (99)
      • Domino 11 (7)
    • Sametime (8)
    • Verse (14)
    • Volt (3)
    • Watson (6)
  • Life (8)
  • Microsoft (7)
    • .NET (2)
    • C# (1)
    • Visual Studio (1)
  • Movies (3)
  • Old Blog Post (259)
  • Personal (23)
  • Programming (84)
    • App Modernization (11)
    • Formula (4)
    • Lotusscript (47)
    • NetSuite (4)
      • SuiteScript (3)
    • node.js (4)
    • XPages (4)
  • Reviews (9)
  • Sci-Fi (4)
  • Software (24)
    • Flight Simulator (2)
    • Games (4)
    • Open Source (2)
    • Utilities (6)
  • Technology (37)
    • Aviation (3)
    • Calculators (2)
    • Computers (6)
    • Gadgets (7)
    • Mobile Phones (7)
    • Science (3)
    • Tablets (2)
  • Travel (7)
    • Europe (1)
    • Texas (2)
    • United States (1)
  • Uncategorized (16)
  • Web Development (50)
    • Frameworks (23)
      • Bootstrap (14)
    • HTML/CSS (12)
    • Javascript (32)
      • jQuery (23)
  • Prev
  • 1
  • 2
  • 3
  • 4
  • 5
  • …
  • 54
  • Next

Administration

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Tracking

Creeper
MediaCreeper
  • Family Pictures
© TexasSwede 2008-2014