Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

creating groupwise appointments programatically 2

Status
Not open for further replies.

nickpatel

Programmer
Jan 5, 2004
41
US
Hi all, I'm using visual foxpro 8 and I am trying to create an appointment in groupwise using vfp. I've gotten the appointment to land in the calendar, but the difficulty I am running into is getting the appointment alarm to work. Programatically sent alarm doesn't work, if I go to groupwise and set alarm, then it works. Also I can't seem to make accept/decline button show up for the appointment. My biggest hurdle is the alarm to flag groupwise users that the appointments needs attention. Here is the following code:

ng = CREATEOBJECT("NovellGroupwareSession")
gobj = ng.Login
msg=gobj.Calendar.Messages.Add('GW.MESSAGE.APPOINTMENT',3)
msg.fromtext='NICK PATEL'
msg.Subject='This is Appt Test from c&g'
msg.BodyText='this is an appointment'
msg.NotifyWhenDeleted=0
msg.NotifyWhenOpened=2
msg.StartDate=DATETIME(2004, 02, 13, 2, 05, 0) && stardate
msg.alarmtime=Datetime(2004,02,13,0,1,0) && alarm time
msg.Place='here'
csendto='ZZZZZZ:NICK PATEL'
snd=msg.Recipients.Add(csendto,"NGW","0")
snd.Resolve()



Any help is appreciated.

Thanks
Nick Patel
 
If you can't get the help here, try a google search (if you have not done so already)

I did one on:
creating groupwise appointments programmatically

It generated several hits that may provide you assistance.

Jim Osieczonek
Delta Business Group, LLC
 
I've tried google search and still cameup empty. There must be other avenues that I can pursue.

thanks
Nick Patel
 
What have you set the AlarmProgram to? Seems you would need to tell it to do something when the alarmtime (date) is reached.

Slighthaze = NULL
craig1442@mchsi.com
"Whom computers would destroy, they must first drive mad." - Anon​
 
I finally got it to work, However a new problem has cropped up. No matter who I send this appointment too, it will only show up in my groupwise calendar. This groupwise programming is getting bizarre by the minute. I know how to send emails to other users through following code:

oGroupWise = CREATEOBJECT("NovellGroupwareSession")
oAccount = oGroupWise.Login
oWorkfolder = oAccount.WorkFolder
oMessages = oWorkfolder.MESSAGES
oMessage = oMessages.ADD
oMessage.FromText = ALLTRIM(.cbo1.value)
oMessage.Subject = ALLTRIM(.e1.value)
oMessage.BodyText = "An appointment needs to be set for your calendar. Please set the alarm for this task: "+ ;
ALLTRIM(.e1.value)+". The due date is: "+DTOC(.txtTc_duedate.value)+" Comments: "+ALLTRIM(.e2.value)
cSendTo ='KERNMAIL:'+ALLTRIM(.txtTc_email.value)
loRecipients = oMessage.Recipients.add(cSendTo,"NGW",'0')
loRecipients.Resolve()
oMessage.send
RELEASE oGroupwise

But sending appointment is little different because there is no calendar method through oAccount.WorkFolder. Still looking.

Thanks

Nick Patel
 
nickpatel,

Perhaps you could post an example of how you got it to work in VFP so the rest of forum could benefit from your solution to the alarm problem or anything else you may have learned thus far? I am sure that there may be others in the future that could really benefit from your experience.

Slighthaze = NULL
craig1442@mchsi.com
"Whom computers would destroy, they must first drive mad." - Anon​
 
thanks slighthaze. I will post what I have found and also new findings. If you have any suggestions on why appointments are going to my account only please let me know. Also thank you for the developer guide link for groupwise, would have never found it in a million years.

thanks
Nick Patel
 
Here is the code for sending appointments if anyone is intrested. A great credit is due slighthaze and vargasfe
who is on vb forum on devx.

ng = CREATEOBJECT("NovellGroupwareSession")
gobj = ng.Login
mailmsg = gobj.MailBox.Messages.Add('GW.MESSAGE.APPOINTMENT')
mailmsg.FromText="someone"
mailmsg.Subject="This is an appointment test from nick"
mailmsg.BodyText="Did this work crieg"
mailmsg.NotifyWhenDeleted=0
mailmsg.StartDate=DATETIME(2004, 02, 19, 08, 30, 0)
mailmsg.AlarmTime=Datetime(2004,02,19,0,5,0)
mailmsg.OnCalendar="TRUE"
mailmsg.Place="HERE"
recpt=mailmsg.Recipients.Add('someproxy:somename@someplace.com','NGW','0')
recpt.Resolve
mailmsg.Send

I hope this helps.

Thanks
Nick Patel
 
nickpatel

May I suggest you create an FAQ (so next time the question is asked we can point to the FAQ rather then digging up this post).

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Sorry here is the revised code again, we need to remove the alarmtime or you will get an dispatch error: here is the code again.

Here is the code for sending appointments if anyone is intrested. A great credit is due slighthaze and vargasfe
who is on vb forum on devx.

ng = CREATEOBJECT("NovellGroupwareSession")
gobj = ng.Login
mailmsg = gobj.MailBox.Messages.Add('GW.MESSAGE.APPOINTMENT')
mailmsg.FromText="someone"
mailmsg.Subject="This is an appointment test from nick"
mailmsg.BodyText="Did this work crieg"
mailmsg.NotifyWhenDeleted=0
mailmsg.StartDate=DATETIME(2004, 02, 19, 08, 30, 0)
mailmsg.OnCalendar="TRUE"
mailmsg.Place="HERE"
recpt=mailmsg.Recipients.Add('someproxy:somename@someplace.com','NGW','0')
recpt.Resolve
mailmsg.Send

By the way how do I create a FAQ, I clicked on write your own faq, but didn't know what to do after that. I'm sorry I never really have used these kinds of forums before, on univeralthread.
 
nickpatel,

No reason to be sorry, there was a first time for all of us. Go into the FAQ area for this forum and scroll all the way to the bottom. Pick one of the defined categories in the drop-down box that you think fits this, or make up your own such as "Novell". Usually we try to pick from the defined categories whenever possible, but once in awhile none of them really fit. Then give your FAQ a Title and put your code in the box below preceded by a little explanation and anything you feel might be helpful to someone reading the FAQ later on. It's much the same as creating a thread, except that you need to pick a category for your FAQ and you can also edit your FAQ(s) later on should you find an error in it or wish to expand on it. Glad to see you'll be taking the time, FAQs are always welcome here.

Slighthaze = NULL
craig1442@mchsi.com
"Whom computers would destroy, they must first drive mad." - Anon​
 
On the faq - please include the links you used. If the FAQ does not exactly fit someone's needs, they may be able to tailor it if they have the source.



Jim Osieczonek
Delta Business Group, LLC
 
Thanks for pointing that out to me jimoo. I added the thread to my text in faq.

Nick
 
Cool. I have not had to work with groupwise in a while, but it is nice to know the code is there in case I need to again.

star.gif
Worthy

Jim Osieczonek
Delta Business Group, LLC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top