Jaziar
asked on
Picklist Not working correctly - Please look
When this code is in place - It is suppose to send a email to all the users selected in the Picklist.
I am Jaziar and I am picking the action Forward
eg: select John Doe
Chuck Roast
The code does not send them a email
eg: If I select John Doe
Jaziar
I get a email and John Doe Does not
eg: I just select Jaziar
I get the email
Here is part of the action code that is doing that
Set newDoc = New NotesDocument(db)
Call thisDoc.CopyAllItems(newDo c, True)
varNewTo = ws.PickListStrings(PICKLIS T_NAMES, True)
k = Inputbox("Enter your comments")
newDoc.SendTo= varNewTo
'newDoc.SenderList = "Forwarded by " & session.CommonUserName & Chr$(13) & newDoc.SenderList(0)
newDoc.Subject = "Fw: " & thisDoc.Subject(0)
newDoc.FowardComments = k
Call newDoc.Send(True, newDoc.SendTo)
But I have discovered that if I remove the Picklist and assign newDoc.SendTo to thisDoc.SendTo
Set newDoc = New NotesDocument(db)
Call thisDoc.CopyAllItems(newDo c, True)
'varNewTo = ws.PickListStrings(PICKLIS T_NAMES, True)
k = Inputbox("Enter your comments")
'newDoc.SendTo= varNewTo
newDoc.SendTo = thisDoc.SendTo
'newDoc.SenderList = "Forwarded by " & session.CommonUserName & Chr$(13) & newDoc.SenderList(0)
newDoc.Subject = "Fw: " & thisDoc.Subject(0)
newDoc.FowardComments = k
Call newDoc.Send(True, newDoc.SendTo)
It will send emails to everyone in the SendTo field from the orig document. Meaning it will send multiple people documents from the script.
Why is it that the using the picklist only sends emails if the person clicking the action is in the picklist selection.
This is so very important to get fix as soon as possible. If you have ideas please respond promptly
I am Jaziar and I am picking the action Forward
eg: select John Doe
Chuck Roast
The code does not send them a email
eg: If I select John Doe
Jaziar
I get a email and John Doe Does not
eg: I just select Jaziar
I get the email
Here is part of the action code that is doing that
Set newDoc = New NotesDocument(db)
Call thisDoc.CopyAllItems(newDo
varNewTo = ws.PickListStrings(PICKLIS
k = Inputbox("Enter your comments")
newDoc.SendTo= varNewTo
'newDoc.SenderList = "Forwarded by " & session.CommonUserName & Chr$(13) & newDoc.SenderList(0)
newDoc.Subject = "Fw: " & thisDoc.Subject(0)
newDoc.FowardComments = k
Call newDoc.Send(True, newDoc.SendTo)
But I have discovered that if I remove the Picklist and assign newDoc.SendTo to thisDoc.SendTo
Set newDoc = New NotesDocument(db)
Call thisDoc.CopyAllItems(newDo
'varNewTo = ws.PickListStrings(PICKLIS
k = Inputbox("Enter your comments")
'newDoc.SendTo= varNewTo
newDoc.SendTo = thisDoc.SendTo
'newDoc.SenderList = "Forwarded by " & session.CommonUserName & Chr$(13) & newDoc.SenderList(0)
newDoc.Subject = "Fw: " & thisDoc.Subject(0)
newDoc.FowardComments = k
Call newDoc.Send(True, newDoc.SendTo)
It will send emails to everyone in the SendTo field from the orig document. Meaning it will send multiple people documents from the script.
Why is it that the using the picklist only sends emails if the person clicking the action is in the picklist selection.
This is so very important to get fix as soon as possible. If you have ideas please respond promptly
ASKER
I moved this up
varNewTo = ws.PickListStrings(PICKLIS T_NAMES, True)
Set newDoc = New NotesDocument(db)
varNewTo = ws.PickListStrings(PICKLIS T_NAMES, True)
Call thisDoc.CopyAllItems(newDo c, True)
k = Inputbox("Enter your comments")
newDoc.SendTo= varNewTo
'newDoc.SenderList = "Forwarded by " & session.CommonUserName & Chr$(13) & newDoc.SenderList(0)
newDoc.Subject = "Fw: " & thisDoc.Subject(0)
newDoc.FowardComments = k
Call newDoc.Send(True, newDoc.SendTo)
It sent the emails like it should but no form with it.
varNewTo = ws.PickListStrings(PICKLIS
Set newDoc = New NotesDocument(db)
varNewTo = ws.PickListStrings(PICKLIS
Call thisDoc.CopyAllItems(newDo
k = Inputbox("Enter your comments")
newDoc.SendTo= varNewTo
'newDoc.SenderList = "Forwarded by " & session.CommonUserName & Chr$(13) & newDoc.SenderList(0)
newDoc.Subject = "Fw: " & thisDoc.Subject(0)
newDoc.FowardComments = k
Call newDoc.Send(True, newDoc.SendTo)
It sent the emails like it should but no form with it.
ASKER
What could be getting copied over
Call thisDoc.CopyAllItems(newDo c, True)
That is breaking the picklist?
Call thisDoc.CopyAllItems(newDo
That is breaking the picklist?
Hi Jaziar, the story continues (http:Q_21395643.html).
Can you create a fixed array instead of the thisDoc.SendTo assignment, just to test if anything new is accepted? Like this
Dim st(1) As String
st(0)= "Jaziar/ACME"
st(1)= "John Doe/ACME"
newDoc.SendTo= st
etc.?
And additionally, just after the PickList, do this:
Messagebox "Picklist returned " & (Ubound(varNewTo)+1) & " names"
Can you create a fixed array instead of the thisDoc.SendTo assignment, just to test if anything new is accepted? Like this
Dim st(1) As String
st(0)= "Jaziar/ACME"
st(1)= "John Doe/ACME"
newDoc.SendTo= st
etc.?
And additionally, just after the PickList, do this:
Messagebox "Picklist returned " & (Ubound(varNewTo)+1) & " names"
ASKER
Doing it now
ASKER
Dim st(1) As String
st(0)= "Jaziar/ACME"
st(1)= "John Doe/ACME"
newDoc.SendTo= st
This once again only sent a email to Jaziar and not John
Messagebox "Picklist returned " & (Ubound(varNewTo)+1) & " names"
Said returned 2 names
I mean I move the Picklist above the copy and it sends the emails correctly, put it back and it breaks
Can only be used in the first form of the method.?? can this be the problem?
st(0)= "Jaziar/ACME"
st(1)= "John Doe/ACME"
newDoc.SendTo= st
This once again only sent a email to Jaziar and not John
Messagebox "Picklist returned " & (Ubound(varNewTo)+1) & " names"
Said returned 2 names
I mean I move the Picklist above the copy and it sends the emails correctly, put it back and it breaks
Can only be used in the first form of the method.?? can this be the problem?
> This once again only sent a email to Jaziar and not John
So if you don't use the Picklist at all, it still doesn't work. Beats me why...
Did you already try the last suggestion in the other question, about using the current document?
So if you don't use the Picklist at all, it still doesn't work. Beats me why...
Did you already try the last suggestion in the other question, about using the current document?
ASKER
Using the current document? I am not sure, we have tried so many things. what is strange is moving the picklist up above the copy and it works fine. The copy has to be getting a value that is overridding the sendTO
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Same Problem - OK I dont think this is for whatever reason is going to work - can you think of a another way to send a email to the users in the picklist?
ASKER
I just found a document in my inbow that has been forwarded by other people. I hit forward and it worked. Is there a way to find out what code is behind that action button? I knew it used to work.
ASKER
I was completly off on this one. The problem is with a ReadersField on the first form. There is a readers field on the first form that is set to [Everybody]. When the email is sent it adds the SendTo users to the DocReaders + [everybody]
so the 2 form with the forward action (problem above) is only showing to form to the people added the DocReaders. I think when forward is clicked it needs to add the users from the picklist to the readers field as well
so the 2 form with the forward action (problem above) is only showing to form to the people added the DocReaders. I think when forward is clicked it needs to add the users from the picklist to the readers field as well
ASKER
PICKLIST_NAMES (0) Displays the names dialog box. Can only be used in the first form of the method.??