/ Forums / Advansys Formativ / Formativ Creator / API not matching documentation
-
CreatorTopic
-
August 14, 2007 at 7:41 am #3602
I’ve been trying to get the <TO>, <CC>, <BC> fields and am having difficulty.
1. msg = Groupwise.ComposingItem
a) msg.recipients
– does not workb) msg.to_
– does not workc) msg.cc
– does not work2. using the following:
http://www.advansyscorp.com/forums/topic/1374072161/#post-8491msg.recipients does not work
3. using the following:
http://www.advansyscorp.com/forums/topic/5254096672/Set theAppt = Client.ClientState.CommandMessage
is not in the docs at all.
-
CreatorTopic
-
AuthorReplies
-
August 15, 2007 at 8:34 pm #5577
ComposingItem is a Formativ wrapper around draft message. Draft message is the composing message which is not sent/saved. Its lets the developer to easily access the draft message properties. In GroupWise, you can access the message properties using the Token API, Object API and SOAP API (GroupWise 7 onwards). Some message properties, you can only access through a specific API (For example, Token API to access the draft message recipients, etc)
Please see the sample code below of the Token and Object API to access the recipients. As stated below, you can use the Token API to access the recipients for the draft and standard message (i.e. received, sent, etc). Object API to access the recipients of the standard message.
Token API: http://developer.novell.com/documentation/gwtoken/index.html?gwtokens/data/hj8ej8g5.html.
Get the recipients from the draft and standard message (i.e. received, sent, etc)iMsgID = groupwise.ItemMessageIDFromView ' TO msgbox groupwise.ItemGetText(iMsgID, 0) ' CC msgbox groupwise.ItemGetText(iMsgID, 2) ' BC msgbox groupwise.ItemGetText(iMsgID, 3)
Object API: http://developer.novell.com/documentation/gwobjapi/index.html?gwobjenu/data/h7ikbsqg.html
Get the recipients from the draft and standard message.Set oMsg = Client.ClientState.CommandMessage for x = 1 to oMsg.Recipients.Count set oRecipient = oMsg.Recipients.Item(x) msgbox oRecipient.EmailAddress & vbcrlf & oRecipient.TargetType set oRecipient = nothing next set oMsg = nothingHope this helps.
Regards,
Advansys SupportAugust 16, 2007 at 8:23 am #5574I’ve tried using the following 6 methods to get <TO>, <BC>, <CC> and none work including your suggested code. Please help.
Groupwise – 6.5.6 (2/1/2006)
Formativ – Build 2.0.0.12METHOND 1)
dim msgid
msgid = groupwise.ItemMessageIDFromView
msgbox groupwise.itemgettext(msgid,itfBC)METHOD 2)
dim RecCounter, RecipientEntry, CCRecHolder, BCRecHolder
dim RecHolderIf msg.Recipients.count > 0 then
for RecCounter = 1 to Msg.Recipients.count
set RecipientEntry = Msg.Recipients.Item(RecCounter)
‘ Recipient type of an address
Select Case RecipientEntry.TargetType
Case 0 RecHolder = RecHolder & RecipientEntry.EmailAddress & “, “
Case 1 CCRecHolder = CCRecHolder & RecipientEntry.EmailAddress & “, “
Case 2 BCRecHolder = BCRecHolder & RecipientEntry.EmailAddress & “, “
End Select
set RecipientEntry = nothing
next
End if
msgbox “RecHolder=” & RecHolder
msgbox “ccRecHolder=” & CCRecHolder
msgbox “bcRecHolder=” & BCecHolderMETHOD 3)
set msg = GroupWise.ComposingItem
msgbox msg.to_ ‘DOES NOT WORK
msgbox msg.subject’WORKSMETHOD 4)
call groupwise.focusset(fcsCC, “”)
msgbox “char=” & groupwise.envtextcurrentwordMETHOD 5)
iMsgID = groupwise.ItemMessageIDFromView‘ TO
msgbox groupwise.ItemGetText(iMsgID, 0)METHOD 6) does NOT work for active (DRAFT) object
Set oMsg = Client.ClientState.CommandMessage
for x = 1 to oMsg.Recipients.Count
set oRecipient = oMsg.Recipients.Item(x)
msgbox oRecipient.EmailAddress & vbcrlf & oRecipient.TargetType
set oRecipient = nothing
nextset oMsg = nothing
August 16, 2007 at 6:06 pm #5582– Is the message is draft (not send or saved) or standard message (received, sent, etc)?
– How are you executing the code? For example, you need to execute the code “groupwise.ItemMessageIDFromView” when the message view is opened. We recommend to execute the applet from the message Toolbar to access the message ID.It could be a problem in your GroupWise client, you may need to upgrade to the latest point release.
Regards,
Advansys SupportAugust 17, 2007 at 6:56 am #5576The message is whats created when you click ‘New Mail’.
I’ve also tried using GW 7.0.1 and most recent Formativ.
August 20, 2007 at 12:07 am #5575Perhaps we are missing something, the example code works in here. Please see below the steps:
– Create an applet and place the above sample code. Screenshot: http://www.screencast.com/t/lh9cWX3t
– Set the applet integration to Email toolbar. Screenshot: http://www.screencast.com/t/FDsPnL_K1YW
– Create a new message in GroupWise client, enter some recipients (To, CC, etc)
– Run the applet from the message toolbar. Screenshot: http://www.screencast.com/t/gyFWPW2WwCan you reproduce the same behaviour using the steps above?
Regards,
Advansys SupportAugust 21, 2007 at 10:15 am #5579Hi,
I tried the suggested steps and still get empty <TO>, <CC>, <BC> in the message boxes… is there a security setting somewhere that is preventing me from getting the values?
August 21, 2007 at 10:22 am #5581ARGH. It and the other examples work for certain users… I’m trying to figure out how come some display and others do not.
August 21, 2007 at 10:50 am #5578It seems theres a user config conflict with some of the Novell users.
The other thing, the msg.to_, msg.bc, msg.cc only return Novell validated users (which is not documented). Trying to figure out why some users are validated and others are not.
August 21, 2007 at 4:10 pm #5580We haven’t had any report about this issue. As you said in earlier post, the issue could be related to the security settings in your environment.
quote:
msg.to_, msg.bc, msg.cc only return Novell validated users (which is not documented)
I have forwarded the comments to engineers for review.
Regards,
Advansys Support -
AuthorReplies
- You must be logged in to reply to this topic.