Problem solve Get help with specific problems with your technologies, process and projects.

Web agent cannot extract attachment

I am trying to execute an agent on the Web that can extract an attachment on a document to a particular path using "Call notesEmbeddedObject.ExtractFile( path$ )." But it is not extracting any attachment. When I look in that particular path, no error is returned. The same agent works fine on a Lotus Notes client. Here is part of the code:

If ( rtitem.Type = RICHTEXT ) Then
Forall o In rtitem.EmbeddedObjects

If ( o.Type = EMBED_ATTACHMENT ) Then
   Call o.ExtractFile _
   chemin &Cstr(Day(whennow)  
& Month (whennow)  & Right(Year(whennow),2)  
&"-" & Hour(current) & Minute(current) )&".html") 

   nomfichier=( chemin &Cstr(Day(whennow)  
& Month(whennow)  & Right(Year(whennow),2)  
&"-" & Hour(current) & Minute(current) &".html")) 
End If
End Forall

Can you help me discern the problem? FYI, when I put a "print o.name," it does return the name of an attachment. It is only the extracting part which is not working.

I assume that we are talking about Domino 6.5+ here. It sounds like a problem that has to do with agent execution rights. On the agent properties of your agent, is the agent running as web user? If it is running as web user, then your web user needs to be mentioned in the "Run unrestricted methods and operations" field on the server documents. If the agent is not running as web user, then the agent signer (the person who saved the agent last) needs to have these rights.

Finally, again on the properties of your agent, you need to have a look at the property called "Set runtime security." This needs to be set to 2 or 3. . .probably 3.

All these security features are there to make sure that the right to access the file system of your Domino server is only made available to users when they really need to have it.

Do you have comments on this Ask the Expert question and response? Let us know.

Dig Deeper on Lotus Notes Domino Agents

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...