Lotus Notes Domino

If you have bookmarked databases on your Lotus Notes workspace you might as I do open them in Domino Designer from there. I have noticed that the option ‘Open in Designer’ doesn’t get updated instantly if changing access. In fact, I don’t know if it does at all.

Let’s say I bookmarked a database and didn’t have designer access to it. Then later, if I would get access, the option ‘Open in Designer’ will not be available on right mouse click on the bookmark icon although I actually have it.

As you can see below the option is not available.

One way to get it back is to rightclick the mouse and choose Application -> Access control. A dialog box will open. Simply close it and rightclick again. Now you’ll see the ‘Open in Designer’ option.

Share and Enjoy:

  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • email
  • Google Buzz
  • RSS
  • Slashdot
  • Technorati
  • Add to favorites
  • DZone
  • LinkedIn
  • MySpace
  • Tumblr

Be the first to comment

Simple Ajax functionality with Ext.js and Domino

by Niklas Waller on December 31, 2009

in Lotus Notes Domino

Here is a simple example of how to easily achieve Ajax-functionality with Domino and Ext.js.
The idea is to, from a page that is opened in a web browser, call a Domino agent asynchronously and in the background to do some work and to provide feedback on it. The page is then updated when the work is done.

1. Download the Ext core (http://www.extjs.com/products/extcore/download.php). This is a JavaScript library that among others contains functionality that can be used to achieve Ajax functionality easily.

2. Copy the contents from the JavaScript file ‘ext-core.js’

3. In your Lotus Notes database, create a Javascript library named ext-core.js and paste in the copied content from step 2.

4. Create a page with some Pass-Thru HTML.
- A button which when clicked on runs a JavaScript function ‘runAjax();’
- A div-tag in where the result from the Ajax query is displayed

<table>
<tr><td><input type=”button” value=”Run” onclick=”runAjax();” /></td></tr>
<tr><td><div id=”results”></div></td></tr>
</table>

5. Add a script tag in the ‘HTML Head Content’ section of the page to include the JavaScript library to the page.

<script type=’text/javascript’ src=’ext-core.js’></script>

6. Define the Javascript function ‘runAjax()’ in the ‘JS Header’ section of the page. This function calls an url, in this case a Domino agent, which is run. If the agent was run successfully and the call and response was successful we can decide what to do. Here we update a div on the page with the response from the agent, i.e. what the agent prints.

function runAjax() {

Ext.Ajax.request({
url: ‘myController?openagent’,
method: ‘GET’,
success: function(response, opts) {
document.getElementById(‘results’).innerHTML = response.responseText;
},
failure: function(response, opts) {
alert(‘server-side failure with status code ‘ + response.status);
}
});

}

7. Create the agent ‘myController’.
The idea with the agent is to have it run the actual logic and that would be work with Domino data for searching or modifying for example. The agent could just do something with data but also send back information or status to the page that called it. In this example the calling page only runs the agent and the agent only prints a text line as a response or feedback.

Sub Initialize()
Print “Foo bar”
End Sub

8. Done! Open the page in the web browser and click the button. The text ‘Foo bar’ should be displayed shortly in the div.

Note: This does not work in the Notes client, only in a web browser.

Share and Enjoy:

  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • email
  • Google Buzz
  • RSS
  • Slashdot
  • Technorati
  • Add to favorites
  • DZone
  • LinkedIn
  • MySpace
  • Tumblr

Be the first to comment

I wanted to create a simple XPages application for a specific purpose but since I haven’t learned that yet and didn’t have the extra time to do so either I had to go for the old style version. So I created a web form with some JavaScript and CSS. What I explain below is probably old news for most of you but I wasn’t aware of this so I’m sure there are others.

I created a form with passthru HTML and added combo boxes to be able to select values from. The values were taken from a DbLookup from a keywords view. This looked fine and also worked fine in Firefox and Google Chrome. But for Internet Explorer (7) the values wasn’t passed when clicking save and calling the submit function.

So I checked the source code and saw that the options lacked values. For Internet explorer the select box was built like this:

<select>
<option>Value 1
<option>Value 2
<option>Value 3
</select>

And hence no values were passed.

For Firefox and Chrome however the select box was by default built this way:

<select>
<option value=”value1″>Value 1</option>
<option value=”value2″>Value 2</option>
<option value=”value3″>Value 3</option>
</select>

The workaround:
Since I didn’t need to save the values chosen but only needed them to save to other fields I could instead print HTML in a computed text that allowed the select box to print correctly also for IE.

Here’s the formula code for that:

tmp := @DbLookup(Notes:Recache;”":”";”LookupKeywords”;”Keyword”;”Values”);
str := “<select id=’someId’ class=’comboboxCssClass’>”;
str := str + @Implode(“<option value=’” + tmp + “‘>” + tmp + “</option>”);
str := str + “</select>”;
str

Share and Enjoy:

  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • email
  • Google Buzz
  • RSS
  • Slashdot
  • Technorati
  • Add to favorites
  • DZone
  • LinkedIn
  • MySpace
  • Tumblr

Be the first to comment

Learning XPages – Searching for material

by Niklas Waller on October 29, 2009

in Lotus Notes Domino

I have been taking it slow with Notes and Domino for the past year because of other obligations. Now I got the opportunity to create a webapp and I decided to do it in Lotus Notes and I thought I should go for Notes 8 and XPages to get a nice feeling for the user. I have to develop it in a pretty short time frame as well.

So I need to search and browse through some material for documentation and examples to get started. Do you recommend any special source on documentation, references or examples regarding XPages that I could use?

Any lessons learned or other info that might be good to know about since its been out for some time now?

I have specified some links below that seemed useful to me when Googling it quickly.
Appreciate any links on this!

- IBM Knowledge Collection: XPages
- The XPages Blog
- Learning XPages By Declan Lynch
- XPages in Lotus Domino Designer Wiki
- Harness the power of XPages in Lotus Domino Designer

Share and Enjoy:

  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • email
  • Google Buzz
  • RSS
  • Slashdot
  • Technorati
  • Add to favorites
  • DZone
  • LinkedIn
  • MySpace
  • Tumblr

6 comments

Add the following parameter to your notes.ini file and then restart the Lotus Notes client:

Window_Title=King of Lotus Notes

Now you will be able to see the results at the top left of the client window.

Also an excellent opportunity for an administrator to show your power over the users in your organization EmoticonWink

I will check if it’s the same for version 8 or not or if any of the readers know, you are welcome to post a comment about it.

Share and Enjoy:

  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • email
  • Google Buzz
  • RSS
  • Slashdot
  • Technorati
  • Add to favorites
  • DZone
  • LinkedIn
  • MySpace
  • Tumblr

2 comments

Sometimes it is nice to send an invitation of some kind in an email instead of a regular Notes meeting invitation. You might want the invitation to have a more party feeling for example. In this case it could be handy to add one or several buttons in the Notes email that you send for different functionality purposes.

When clicking one of these buttons an email could be sent or an appointment or meeting could be booked in the recipient’s calendar or maybe both.

Here’s some example code to put on a button that creates an appointment in the calendar of the user that clicks on it. As you can see this code is added to the button’s Click Sub.

Sub Click(Source As Button)

Dim s As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim dt1 As NotesDateTime
Dim dt2 As NotesDateTime

mail = Evaluate(“@MailDbName”)

Set db = s.GetDatabase(mail(0), mail(1))

Set doc = New NotesDocument(db)

Set dt1 = New NotesDateTime(“2009-06-03 18:00:00 PM”)
Set dt2 = New NotesDateTime(“2009-06-03 22:00:00 PM”)

doc.Form = “Appointment”
doc.Subject = “Project kick-off”
doc.AppointmentType = “0″
doc.Body = “Welcome to this project’s kick-off. It will be held… bla bla bla”

Set doc.CalendarDatetime = dt1
Set doc.StartDatetime = dt1
Set doc.StartDate = dt1
Set doc.StartTime = dt1

doc.Logo = “StdNotesLtr28″
doc.MeetingType = “1″

doc.Location = “Restaurant Three Barrels”

doc.duration=6
Set doc.EndDateTime = dt2
Set doc.EndDate = dt2
Set doc.EndTime = dt2
doc.From = s.UserName
doc.ExcludeFromView = “D”
doc.ORGTABLE = “C0″
doc.Broadcast = “”
doc.Categories = “”

doc.BookFreetime = “”

Call doc.AppendItemValue(“$BusyName”, s.UserName)
Call doc.AppendItemValue(“$BusyPriority”, “1″)
Call doc.AppendItemValue(“$NoPurge”, dt2)
Call doc.AppendItemValue(“$PublicAccess”, “1″)
Call doc.AppendItemValue(“_ViewIcon”, 160)

Call doc.Save(True, False)

Msgbox “An appointment regarding this event has been added to your calendar!”

End Sub

If you would like an email to be sent to you as well when the button is pressed you can add the following to the code above.

Dim mailDoc As NotesDocument
Set mailDoc = New NotesDocument( db )
mailDoc.Form = “Memo”
mailDoc.SendTo = “me@mail.com”
mailDoc.Subject = “I’ll be there!!”
mailDoc.Body = “Wow, that sounds really nice, count me in!”
Call mailDoc.Send( False )

One thing to note is that you need Domino designer installed since this is LotusScript or else you will only be able to create buttons with simple actions.

Either you can create it directly in a Notes memo by clicking Create -> Hotspot -> Button. Or you can do it in Domino designer and copy it into the email.

So if you are a user with only the standard Lotus Notes client, maybe you can ask a colleague with designer access to help you. All she need to do is to customize the buttons for you and then email them to you. However, this will only work if you send Notes mails within the organization. The buttons dissapear if you try to send them to an Internet address via MIME.

Share and Enjoy:

  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • email
  • Google Buzz
  • RSS
  • Slashdot
  • Technorati
  • Add to favorites
  • DZone
  • LinkedIn
  • MySpace
  • Tumblr

Be the first to comment

If I want to copy a number of cells from Excel and put in Notes but still editable, preferably in a regular Lotus Notes table, how do I do that?

The first impulse might be to copy and paste as is. The cells become an image in the Notes document this way though. A better option is to use the “Paste special” option in the ‘Edit’ menu. Here you can choose to paste the Excel cells into the Notes document as for example an embedded Excel area, pure text or HTML. I would suggest HTML as the best choice for this purpose.

All you have to do after this paste is to modify the Notes table with the table properties, for example the border size and color and so on.

Below, see the before and after looks of the pasted excel cells after working a bit with the Lotus Notes table properties.

Share and Enjoy:

  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • email
  • Google Buzz
  • RSS
  • Slashdot
  • Technorati
  • Add to favorites
  • DZone
  • LinkedIn
  • MySpace
  • Tumblr

9 comments

There has always been a limit on how many documents it is possible to copy manually from a Lotus Notes view (with for example CTRL-C). This limit is 2335 documents. If you need to copy more documents you need to do it several times or manage it programatically.

However, in version 8 of Lotus Notes this limit seems to have been considerably improved. I can copy up to 49999 documents the same way. When I try to copy documents above that number no warning or error message is raised. Instead an irrational behaviour occurs, which means that it starts copying 4013 documents or something similar.

Do anyone know anything about this limit? Is it just my Notes client that stops at 49999 documents or is this the official limit?

By the way I really appreciate that this limit has been increased since it happens now and then that I need to copy more than 2335 documents from one view to another.

Another great improvement is that it is possible to select a range of documents. Select a document, scroll down the view, hold the SHIFT button and click on the mouse. Like in Windows explorer this causes all the documents within this range to be selected.

Share and Enjoy:

  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • email
  • Google Buzz
  • RSS
  • Slashdot
  • Technorati
  • Add to favorites
  • DZone
  • LinkedIn
  • MySpace
  • Tumblr

2 comments

This tip is very basic. Nevertheless I have come to understand that its not common knowledge of either basic users or developers.

Say that you have a document in one view among many other thousands. Another view in the same database is structured in a hierarchy with parent and response documents for example. Now, you would like to find the selected document in the first view in the other parent-response view with a single click. Here’s how to do it.

1. Select the document (in the first view)
2. Hold the CTRL-button
3. Click the other view

If the document is listed in the other view, the view will open with that document selected.

Share and Enjoy:

  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • email
  • Google Buzz
  • RSS
  • Slashdot
  • Technorati
  • Add to favorites
  • DZone
  • LinkedIn
  • MySpace
  • Tumblr

1 comment

You can access Lotus notes documents from outside Lotus Notes either using an Internet url (if your Lotus Notes database is web enabled) or you can access and open up a specific Lotus Notes document in the Lotus Notes client from for example Excel or Word in other ways.

Duffbert has some good information on this. One of the tips is to get the document’s Notes url and paste it in as a hyperlink in Excel. To accomplish that you need to find the document’s UNID. Or you can use the Sametime client for some translation.

Create a document link for the Lotus Notes document to which you want to create a link to. Paste this into a Sametime chat window. As you can see the document link is translated into a Notes URL. Now, simply paste it in as the hyperlink address in excel and you have a funtional Notes link.

When you paste the document link into a Sametime chat window it will be translated into a Notes URL, looking something like this, which can be accessed from outside Lotus Notes. Be aware of access though, these rules still apply.

notes://DOMINOSERVER/C1257465003C1F7D/BF25AB0F47BA5DD785256

Share and Enjoy:

  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • email
  • Google Buzz
  • RSS
  • Slashdot
  • Technorati
  • Add to favorites
  • DZone
  • LinkedIn
  • MySpace
  • Tumblr

14 comments