Skip to main content

Posts

Showing posts with the label LotusScript

Daylight Savings Mayhem - Automating a Check of Notes INI

Yesterday we discovered that there are changes to the Australian Daylight Savings dates coming into effect this weekend (it will continue when it would normally have ended). There are lots of repercussions, but the worst (ones that could affect the business) relate to the Lotus Notes Calendar. There are two things to do to prepare ourselves; Windows Updates on our clients (WinXP) Windows Updates on our servers (Win2003) We can handle the servers ourselves but how do we know if the clients have done their updates? Simple, we ask them by sending a button around so they can determine the answers for themselves. Creating a Button that can be mailed to Notes Users Here's the LotusScript code on my button; Sub Click(Source As Button)   Dim vDSTText As Variant   Dim Session As New NotesSession   Const CorrectDST = "10,1,1,4,1,1"   vDSTText = Session.GetEnvironmentString("DSTLAW",1)   If vDSTText = CorrectDST Then      ...

A Useful Little Routine to Change Data in Fields

Level: Beginner Development Today I thought I'd just share with you a little routine that I use when I want to make field level changes to a lot of documents without having to edit them. It's beginner stuff but I use it a lot. What you need A document, or group of documents with a field called DocNumber A view where you can select those documents. Notes Designer. Creating the Agent Open Designer on the database (or template) Click on Shared Code then Agents Click on the button marked New Agent In the Properties box, give your agent a Name eg: Change Document Number It should be a Shared Agent In the Target Section, it should read All Selected Documents You don't need to change anything else in the properties box, so just close it. Now, in the intialize event of your Agent (just click on the word initialize and type in the box that appears). Type your code (or paste it from this page). When you've finished, Close the agent windows and choose YES to save your changes. Th...

Figuring out the Server Name

A bit about our Off-site Server Project The aim of this project was always to have an off-site server that was capable of providing us with alternative facilities in the event of a disaster. My employers were on Domino before I started working here (7 years ago) and many of our oldest databases are in relatively "untouched" form. One of the biggest challenges of our off-site server project was always going to be the detection and removal of server-name hard-coding. Discovering all those server names was a tedious business which I won't go into here. This blog entry will provide you with one bit of code we used to replace a single-line server name. We used several different methods but this method is interesting in that it provides an alternative when the server is local. Getting the Server Name itself Generally, getting the server name in a late-domino server is quite easy. There's an @function (@ServerName) for it from R6 onwards, and prior to that it was acce...