199 Lotus blogs updated hourly. Who will post next? Home | Blogs | Search | About 
 
Latest 7 Posts
Strange decision within IBM Verse update for June of 2017 on Android devices
Mon, Jun 12th 2017 8
The application requires com.ibm.xsp.extlibx.library. This library cannot be found.
Wed, May 24th 2017 4
Great news about BM Notes/Domino 9.0.1 Feature Pack 8
Fri, Jan 27th 2017 8
How to set Workspace as default homepage in IBM Notes client
Wed, Oct 26th 2016 9
Avoid processing items as both NotesItem and NotesMIMEEntity objects concurrently.
Thu, Jul 21st 2016 5
Third level in "Application links" section of Xpages Application Layout, WTF?
Sat, Jul 16th 2016 4
How to get a list of components for not open Xpage ?
Thu, Mar 24th 2016 5
Top 10
Corrupted unread list in Mail database caused "This database cannot be read due to an invalid on disk structure"
Thu, Jul 17th 2014 12
IBM Lotus Notes and Ctrl+Break on new laptops without button "Pause/Break" on keyboard. Is it familiar to you? :-)
Thu, May 29th 2014 10
If you can't remove lotus notes database icon from workspace
Wed, Sep 10th 2014 9
How to set Workspace as default homepage in IBM Notes client
Wed, Oct 26th 2016 9
No such session or session has been closed
Sun, Nov 2nd 2014 8
NotesItem.Type = 256 causes "Variant does not contain a container"
Sat, Jul 26th 2014 8
Great news about BM Notes/Domino 9.0.1 Feature Pack 8
Fri, Jan 27th 2017 8
Strange decision within IBM Verse update for June of 2017 on Android devices
Mon, Jun 12th 2017 8
Wrong name of attached file in inbound email: "=?UTF8?Q?=....
Tue, Apr 15th 2014 7
How to focus Lotus Notes window (standard version)
Wed, Dec 17th 2014 6


NotesAgent.Runwithdocumentcontext() - cool thing
Twitter Google+ Facebook LinkedIn Addthis Email Gmail Flipboard Reddit Tumblr WhatsApp StumbleUpon Yammer Evernote Delicious
   

Hi guys

I would like to draw your attention to method Runwithdocumentcontext() of NotesAgent class.

I personally missed this method somehow and found out about it just recently though it was released with IBM Lotus Notes 8.5.2.

It finally allows developers to pass a non-saved NotesDocument to a NotesAgent. Let me explain.

I believe all of you had a task where you needed to pass many constants/parameters/fields to a NotesAgent to let the agent to do some work. Earlier (prior LN 8.5.2) we had only two methods for that:

  • NotesAgent.Run(noteid)
  • NotesAgent.RunOnServer(noteid).

Notice, since these two methods work with NoteId it is required to save document to be able to pass it to NoteasAgent.

I usually created a temporary document, put required parameters there, saved document and then passed its NoteId to one of the methods mentioned above depends of what I need to rich.

However...


However, the problem of this way was that later I had to clean up after myself - I had to remove that temporary document that I didn't need any more. It wasn't so easy task though. The NotesAgent.Run() method works with a current user's privileges and document deletion can be restricted. The same about NotesAgent.RunOnServer(noteid) in a local replica. Besides that if agent fails then temporary documents can stay in database as garbage. So, to be sure for 100% that I cleaned up everything I had to create a scheduled agent for that that is not the best option also - I personally do not like if database contains many scheduled agents, especially if you use some common template for tens of similar applications. Plus all these things about Server Security - sometimes (if you work for big companies with complex internal policies) it is a tricky thing to get permission to create any scheduled agents, you know :-)

But now, with this nice method NotesAgent.Runwithdocumentcontext(documentcontext as notesdocument, optional byval noteid as string) you can pass any number of parameters to a NotesAgent through a temporary document without need to save it and later delete.



---------------------
http://ypastov.blogspot.com/2014/05/notesagentrunwithdocumentcontext-cool.html
May 29, 2014
4 hits



Recent Blog Posts
8
Strange decision within IBM Verse update for June of 2017 on Android devices
Mon, Jun 12th 2017 3:41p   Yuriy Pastovenskyy
Hi IBM released a new update for IBM Verse in June 2017 - here is a link to "what's new". There is a new feature for Android about: Verse for Android: Certificate-based authentication However I don't think the way it works is correct. See my story below... Accordingly to documentation there are three authentication options supported by IBM Verse on Android devices: Traditional username/passwordCertificate-only authenticationCertificate and username/passwordOne of my customers had a foll
4
The application requires com.ibm.xsp.extlibx.library. This library cannot be found.
Wed, May 24th 2017 5:26p   Yuriy Pastovenskyy
Hi I want to share one strange thing that happened to me today. I have reinstalled IBM Notes 9.01 but did it a bit unusually: 1) I uninstalled IBM Notes and cleaned up all files and folders which usually stay after uninstallation. 2) Then I installed IBM Notes 9.01 and FP7 but when I wanted to install Extension Library from openntf.org I realized that I forgot to enable Domino Designer and Domino Administrator options during setup. So I run installer again, chose option "Modify", enabled Do
8
Great news about BM Notes/Domino 9.0.1 Feature Pack 8
Fri, Jan 27th 2017 3:22p   Yuriy Pastovenskyy
Notes/Domino Fix List (Copied from here) IBM Notes/Domino 9.0.1 Feature Pack 8 Preliminary Release Notice January 27, 2017 Beginning with 9.0.1 FP8, fix packs have been renamed to feature packs. To ensure quality, these feature packs still have a high focus on addressing high impacting defects. Where possible, these features are optional enabled to minimize risk. The same packaging, architecture and install kits used in previous fix packs remain in use for feature packs. IBM has identified im
9
How to set Workspace as default homepage in IBM Notes client
Wed, Oct 26th 2016 11:22a   Yuriy Pastovenskyy
Hi Recently I've got the task to set up Workspace as default homepage in IBM Notes client for about 400 users. Googling didn't really help - suggestion from IBM I found looked crazy and I didn't want to mess with it. My hope on Domino policies didn't work either - not sure, may be I missed something. However I found another interesting thing that can be very helpful for resolving this task. Database Bookmark.nsf (where Workspace is actually located) contains form "WPDiscoverChange" wi
5
Avoid processing items as both NotesItem and NotesMIMEEntity objects concurrently.
Thu, Jul 21st 2016 4:46a   Yuriy Pastovenskyy
Hi guys May be this will save a day to someone. Let's imagine you need to send email with HTML inside. In most of cases you would need to use NotesMIMEEntity class and probably some other MIME-related classes to build mail Body. Though it is possible to use the same classes to define Subject, SendTo, CopyTo and other mail headers people often use usual NotesItem-based syntax for the rest simple mail parameters. However very important point is that as soon as you used NotesMIME-class you can




Created and Maintained by Yancy Lent - About - Planet Lotus Blog - Advertising - Mobile Edition