Solved

How to Sign Agents

Posted on 2004-07-30
25
588 Views
Last Modified: 2013-12-18
Hi,
I've an agent that sends email to a group. This agent is triggered when a button is clicked in the form (In Notes ONLY).
The agent is in Lotus Script.
When everyone is clicking the button , it is sending the email correctly but it is sending using my name since i'm the siner of the agent.
I want the senders name as 'accounting department'.

In the agent properties second tab I've put 'accouting department' in the run on behalf of.
However, its still sends the email with sender as my name.

How do I do this
please advise
Sridevi
0
Comment
Question by:sridevi911
  • 10
  • 6
  • 4
  • +3
25 Comments
 
LVL 15

Expert Comment

by:Bozzie4
ID: 11683102
"Run on behalf of" should be a Notes id, in the form of cn=name/o=org
0
 

Author Comment

by:sridevi911
ID: 11684418
Yes its a notes ID in the hierarchical form. But it is still sending the email with my name as the senders name.

0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 11687568
Is Accounting Department a valid id ? If it is a group it wouldn't consider that as id...

~Hemanth
0
 

Author Comment

by:sridevi911
ID: 11688411
No Hemanth its not a group ID. I've given my colleagues ID in the "Run on behalf of"  to test. But Still it is sending email with my name as the senders name.

Thanks
Sridevi
0
 

Author Comment

by:sridevi911
ID: 11688424
Also accounting department is a valid ID. Its basically a mail ID of a mail-in database.
0
 

Author Comment

by:sridevi911
ID: 11688441
Also I read in the help that using java save method, you can save this agent by signing with any name by running another agent. But i do not know how to do it.
0
 
LVL 19

Expert Comment

by:madheeswar
ID: 11691006
if I am running the agent manually triggering from a action button, it should send email with my name. Eventhough u have signed.
Are the users have access to run restricted Lotus Scripts (check in Server document->Security)
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 11692052
Hello Sridevi,

you say you you send the mail by LotusScript.
Then you can use a reserved Field to put the sender name.
Like this:

     memo.Principal = "accouting department"

If that does not work, then append the Notes Domain after the user name:

     memo.Principal = "accouting department@yourNotesDomain"

A third option is to put the internet email address of that user:

     memo.Principal = "accouting.department@company.com"



0
 

Author Comment

by:sridevi911
ID: 11693198
Here is what I've and it is still not working... This is crazy....

I've used doc2.principal as "accounting department" and "accounting department@notesdomain".. Nothing works.

Sub Initialize
      Dim session As New NotesSession
      Dim db As NotesDatabase
      Dim view As NotesView
      Dim doc As NotesDocument
      Dim doc2 As NotesDocument
      
      Dim ritem As NotesRichTextItem
      
      Set db = session.CurrentDatabase
      Set doc = session.DocumentContext
      Set view = db.GetView("ACCAll")
      
      Set doc2 = New NotesDocument(db)
      doc2.form = "Memo"
      doc2.Principal = "Accounting Department"
      doc2.SendTo = doc.CPEmail(0)
            
      doc2.Subject = "Customer ID Informaton: "  & doc.CustomerID(0)
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 11693480
Are you sure that "Accounting Department" is either a register user name on the server or a Group or a MailIn database name?
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 11693543
And it seams that you have to add the Domino Notes Domain after the name:
http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/cf86b6c67413c34385256d87005feb71?OpenDocument

Like this:
doc2.Principal = "Accounting Department@YourNotesDomain"

0
 

Author Comment

by:sridevi911
ID: 11694576
I've tried everything. But nothing works. Not sure why..


doc2.Principal = "Accounting Department@NotesDomain"
doc2.Replyto = "Accounting Department@NotesDomain"
doc2.from = "Accounting Department@NotesDomainn"
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 63

Expert Comment

by:Zvonko
ID: 11694766
Is your "Accounting Department" a person document?
Is that name in both fields, UserName (FullName) and ShortName as first value?

0
 

Author Comment

by:sridevi911
ID: 11694889
OK, I've used my colleagues ID to test. But nothing works. It still uses my name as i'm the one who signed the agent.
I've tried all these...
doc2.Principal = "CN=TIFFANY MANN/OU=EMPL/OU=CA/O=IBM"

doc2.Principal = "TIFFANY MANN/EMPL/CA/IBM"

doc2.Principal = "TIFFANY MANN/EMPL/CA/IBM@IBM"

doc2.Principal = "TIFFANY MANN/EMPL/CA/IBM@NotesDomain"


0
 
LVL 63

Expert Comment

by:Zvonko
ID: 11695009
I expect this to work:
doc2.Principal = "TIFFANY MANN@IBM"

You can find the Notes Domain name in the GlobalDomain document of the names.nsf where your colleague is listed as person.
0
 

Author Comment

by:sridevi911
ID: 11695321
I looked at the domain name in the names.nsf db for my colleague. I specified it as below:

doc2.Principal = "TIFFANY MANN@INotes"

It dosen't work.... This is getting more interesting. The agent runs after clicking a save button in the form.
I asked my colleague to click the button. When he clicks the save button and when the agent runs it sends the email as if he is sending it.
the senders name is his name when he runs the agent.

If I run the agent then the senders name is my name......

0
 
LVL 31

Expert Comment

by:qwaletee
ID: 11695442
Oh, dear.  I think you have something confused.

The Run On Behalf Of is intended only for server-side agents.  From your description, you are using client-side agents.

As to Principal, start small and work your way up.  Create a test agent that is really short:

Sub Initialize
    Dim session as new NotesSession
    Dim db as notesDatabase
    Set db = s.currentDatabase
    Dim doc2 as New notesDocument ( db )
    doc2.form = "Memo"
    doc2.Principal = "TIFFANY MANN@INotes"
    doc2.sendTo = "Some test address hard coded here"
    doc2.Subject = "Test message for PRINCIPAL field"
    doc2.Send False
End Sub

That hsoul be the whole agent.  Once you get it to work and understand how things are consutructed, you can then apply that knowledge to your more specific agent code.
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 11695455
Oh, and FYI, there are two ways to sign an agent with another ID.

1) Get that ID.  IN the DB ACL, grant that ID Designer access to you database, with authority to create public LotuScript agents.  Switch to the ID.  Open the agent.  Save it.

2) Get that ID.  Use the admin client, files tab, select your database, choose Tools -> Database -> Sign.  You probably shoudl also grant that ID access in the ACL.
0
 

Author Comment

by:sridevi911
ID: 11695820
I built the small agent exactly as qwaletee described. But still no results.

who ever clicks the save button the senders name is theirs.  Not sure why doc2.principal is not picking up
0
 

Author Comment

by:sridevi911
ID: 11695941
at this point of time it dosen't make sense to sign the agent with the desired name i want to becuase, who ever is running the agent,
the senders name is being setted to their name.
0
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 25 total points
ID: 11696064
Sorry could not keep pace with this.. I hope you are being helped here.. good luck
0
 
LVL 31

Assisted Solution

by:qwaletee
qwaletee earned 25 total points
ID: 11697406
Funny, worked fine for me, except for one type (I used s.currentDatabase instead of session.currentDatabase).
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 11720607
sridevi, just wondering, are your clients using Notes R5 with a standard Lotus R5 mail template?
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 12698538
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup topic area:
    Split: HemanthaKumar {http:#11696064} & qwaletee {http:#11697406}

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

Zvonko
EE Cleanup Volunteer
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now