Thursday, 13 December 2012

IBM Notes and Domino 9.0 Social Edition Public Beta new features and release notes - Documentation and Cookbooks

IBM Notes and Domino 9.0 Social Edition Public Beta new features and release notes - Documentation and Cookbooks

 

<!-- @page { margin: 0.79in } P { margin-bottom: 0.08in } A:link { so-language: zxx } -->

Primary Link - http://www-10.lotus.com/ldd/ndsebetaforum.nsf/topicThread.xsp?action=openDocument&documentId=C6F8337CA6DCC1FB85257AD300574EF3

 

Here are links to documentation for the IBM Notes and Domino 9.0 Social Edition Beta:

IBM Notes and Domino 9.0 Social Edition Public Beta new features and release notes

IBM Notes Traveler 9.0 Public Beta release notes

IBM iNotes 9.0 Social Edition Public Beta Administrator Guide

Cookbook: Encrypting SAML assertions

Cookbook: Setting up a new Federation on TFIM 2.0

Cookbook: Setting up a new partner on TFIM

Cookbook: Setting up a new federation on TFIM 1.1

Cookbook: Setting up Notes federated login

Cookbook: Setting up ADFS for integrated Windows authentication (IWA)

Cookbook: Setting up new Relying Party Trust for AD FS 2.0

IBM Notes and Domino 9.0 Social Edition public beta now available!

IBM Notes and Domino 9.0 Social Edition public beta now available!

 

It's the holiday season, and I brought you a present a little early.

This morning, we posted the public release of IBM Notes and Domino 9.0 Social Edition beta. I've been running this build for a couple of weeks, and it's singing to me.

According to a survey of our Design Partner Program, two-thirds of the Notes/Domino Design Partners plan to deploy the new Social Edition release within three months of eGA. It may say 9, but this is anything but a "dot zero" release.

For many of you, this is the first opportunity to actually check out IBM's investment in this new beta: modernized UI, embedded experiences and OpenSocial, activity streams, improvements in mail and calendar, the "Discover" page to guide users, the Notes browser plug-in, Domino SAML support, Traveler updates for Windows Phone support, and much more. I hope you'll share some of the excitement of the participants in our IBM Notes and Domino Social Edition webcast last month: Scott Souder, Lance Spellman, Daniel Lieber, and Eric Peterson.

If you are not already registered for public beta, visit http://bit.ly/ND9BETA . To provide feedback and access additional resources, visit the beta feedback forum on ibm.com developerWorks.

There are so many great new features in this release... I would be hard-pressed to pick just one, but in the new public beta build, I love that when you finish with replying or forwarding a mail, the original closes as well. One less click. I love that calendar entry updates auto-process, without having to always click "update calendar." I love that the toolbar only shows up in edit mode, since I almost never have a reason to use it in read or view mode. Clean. Simple. More intuitive. Notes 9.0 Social Edition beta delivers.

Monday, 3 December 2012

iNotes Customization: Perform Server side check before sending emails

This blog is dedicated to Lotus iNotes 8.5 Customization to ensure that some Server side checks can be performed before emails is sent out.. The iNotes Customization documentation has certain examples but not complete to demonstrate this exact scenario..

Special thanks to Eric W. Spencer, IBM for providing wonderful insight for the same.

Steps to follow:

1. Setup Forms85_x.nsf: Instructions on creating the Extension Forms File are in the Lotus iNotes Administrator documentation. The topic can be found in Domino and Notes info center here.

2. Edit Custom_JS_Lite Subform in Forms85_x.nsf

Setup a flag "hAgentSend" in each new Email Document that is created. The starting code is there to pick the current UI Form ids and then create an Input element and add it to current Mail form.

function Custom_Scene_PostLoad_Lite( s_SceneName, bInEditMode ){
    if ((s_SceneName || '').split(':')[1] == 'EdT' && s_SceneName.indexOf('$new') !== -1 ) {
        var oMailInfo = EKc.prototype.EYl[s_SceneName];

            var oElem = AAA.EcK.getElementById(s_SceneName.split(':')[0]);

            var sContentId = oElem.getAttribute('com_ibm_dwa_ui_mailinfo_contentid');

            var oContent = AAA.Fkb().getContent(sContentId);

        // Get the current UI document
        var oMainDoc = AAA.EcK;
        // Get the current backend document ID
        var sDocUnid = oContent.sId;
        // Get the current UI form
        var oForm = oMainDoc.getElementById( 'e-pageui-' + sDocUnid ) || {};
   
        var oInput = oMainDoc.createElement('INPUT');
        oInput.setAttribute('name','hAgentSend');
        oInput.setAttribute('id','hAgentSend');
        oInput.setAttribute('type','hidden');
        oForm.appendChild(oInput);

    }
}

Now, set the code to call an Agent from server using AJAX and enable Mail send functionality only in Callback function of AJAX response:

function Custom_Scene_PreSubmit_Lite( s_SceneName, bInEditMode ){
    if  (s_SceneName == "memo") {

        // Get the current backend document ID
        var oContent = AAA.Fkb().EdI.get('T').oPrev;
        var sDocUnid = AAA.Fkb().EdI.get('T').oPrev.sId;

        // Get the current UI document
        var oMainDoc = AAA.EcK;

        // Get the current UI form
        var oForm = oMainDoc.getElementById( 'e-pageui-' + sDocUnid );

        // If the agent is sending the memo, just send
        if (oForm["hAgentSend"]) {
            if (oForm["hAgentSend"].value == "true")
                return true;
        }
   
        // do any checking here and set up xhr to run agent..............
        url= window.location.protocol + "//" + window.location.hostname + "/inotes/forms85_x.nsf/agCheckGroupAccess?OpenAgent";
http_request = false;
if (window.XMLHttpRequest) { // Mozilla
http_request = new XMLHttpRequest();
if (http_request.overrideMimeType) {
    http_request.overrideMimeType('text/xml');
}
} else if (window.ActiveXObject) { // IE
try {
    http_request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
    http_request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
if (!http_request) {
alert('Cannot create XMLHTTP instance');
return false;
}

        //setting mail send on AJAX Call
        http_request.onreadystatechange  = function()
{
    if(http_request.readyState  == 4)
    {
        if(http_request.status  == 200) {    // success

            var resp = http_request.responseText;
    if(resp.indexOf("true") !== -1)
        bOkayToSend = true;
            // Get response info from agent and do any necessary processing
            // Decide if it's okay to send the memo
            // ...

            if (bOkayToSend) {

                // okay to send the memo
           
                // Get the current backend document ID
                var sDocUnid = AAA.Fkb().EdI.get('T').oPrev.sId;
           
                // Get the current UI document
                var oMainDoc = AAA.EcK;
           
                // Get the current UI form
                var oForm = oMainDoc.getElementById( 'e-pageui-' + sDocUnid );
           
                // Set the flag that says memo is being sent
                oForm["hAgentSend"].value = true;
               
                // Send the memo
                setTimeout("AAA.DSq.ELU(null, 'e-actions-mailedit', 'EbK', {sAction: 'a-send'})", 1000);
            }
            else {
                // put up some kind of error message
                alert("invalid email");
            }
        }
    }
}
       
        //Send AJAX Request
        http_request.open('POST', url, true);
        http_request.send();
       
        // Return false to prevent email from getting sent now
        return false;
    }

    return true;
}

The agent should return a value of "true" to enable the mail send.. Here is the code for the smallest agent:

Option Public
Option Declare

Sub Initialize
   
    MsgBox "Running Agent: iNotes Mail Send"
   
    Print "true"
   
End Sub

Reference Documents:

1. http://www-10.lotus.com/ldd/dominowiki.nsf/dx/The_basics_of_iNotes_customization

2. http://www-10.lotus.com/ldd/dominowiki.nsf/dx/manipulating-data-in-inotes-lite-forms

If required I can publish the modified Forms85_x.nsf here as well.. Please let me know.