Exchange 2003 and Outlook 2003: Conflicts on taskitem

O

Oskar Vaia

Hi,

i have develop a webservice which write date in a taskitem. the webservice
run on a windows 2003 R2 server and works fine.
when i launch the webservice (with a button) from a personalized
taskitemform and immediately after i save the taskitem, i receive a
conflict-message.
I think this, because my webservice save the taskitem and immediately after
on the client i save the taskitem in outlook, too.

Here the code of the webservice:

---
Private Function AktualisierungMahnbriefstufe(ByVal Source_OL_URL As String,
ByVal aktMahnstufe As Char) As String
Dim RetMessage As String = ""
Dim sExchangeServer As String = "EXCH2003"
Dim sEmailAddress As String = "(e-mail address removed)"
Dim text5 As String = Me.SMTPToMailboxURL(sExchangeServer,
sEmailAddress, False)
Dim message As Message = New MessageClass
Dim sourceURL As String = (text5 & "Aufgaben/Inkassi/" &
Source_OL_URL)
Try
message.DataSource.Open(sourceURL, Nothing,
ConnectModeEnum.adModeReadWrite, RecordCreateOptionsEnum.adFailIfNotExists,
Not RecordOpenOptionsEnum.adOpenRecordUnspecified, userName, userPwd)
Dim message3 As Message = Message
message3.Fields.Item("DAV:contentclass").Value =
"urn:content-classes:message"
message3.Fields.Item("http://schemas.microsoft.com/exchange/outlookmessageclass").Value
= "IPM.Task.(p) Aufgabe"
If aktMahnstufe = "1" Then
message3.Fields.Item("http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/MB1").Value
= DateTime.UtcNow
ElseIf aktMahnstufe = "2" Then
message3.Fields.Item("http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/MB2").Value
= DateTime.UtcNow
End If
message3.Fields.Update()
message3.DataSource.Save()
message3 = Nothing
RetMessage = "OK"
Catch exception1 As Exception
ProjectData.SetProjectError(exception1)
Dim exception As Exception = exception1
RetMessage = exception.Message
ProjectData.ClearProjectError()
End Try
Return RetMessage
End Function
---

how can i avoid the conflict?

thx & bye

Oskar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top