Client crash after email treatment

Hi,I’ve got a problem, I created a button on the Memo form in mail85.ntf.

This button open a dialogbox for choosing the client. After these infos are writing in the document and a check flag is set to OK.

Next the document is saved and close and re-open to see modifications. Some clients crash after that, we remark than some emails crashed the client and not some workstation. all these email have an embedded object like a logo or picture.

All treatments on doc are set in the back-end. You can see the code here :

Dim slgDoc As NotesDocument

Dim result As Variant

Set session = New NotesSession

Set db = session.CurrentDatabase

Set workspace = New NotesUIWorkspace

Set uidoc = workspace.CurrentDocument

Set docMail = uidoc.document

If ( uidoc.FieldGetText(“EnCharge”) >“0” ) Then

workspace.Prompt PROMPT_OK, “Impossible”, “Ce message est déja pris en charge.”

Else

Set slgDoc = docMail

result = workspace.dialogbox( "PriseEnCharge", False, False, False, True, False, False, "Selection du client", slgDoc, True, False )

If result = False Then

	Exit Sub

End If

result = Messagebox ( "Confirmez-vous le client " & slgDoc.ClientNom( 0 ) & " [" & slgDoc.Client( 0 ) &"] / mandat " & slgDoc.Mandat( 0 ), 4 + 32 + 256 , "Prise en charge" )

If result <> 6 Then

        Print "canceled"

	Exit Sub

End If

docMail.ClientNom = slgDoc.ClientNom( 0 )

docMail.Client = slgDoc.Client( 0 )

docMail.Mandat = slgDoc.Mandat( 0 )

docMail.EnCharge = session.CommonUserName

    docMail.FlagCategorisationDirect = "2"

docMail.approbateur1 = ""

docMail.approbateur2 = ""

docMail.approbateurRemplacant1 = ""

docMail.approbateurRemplacant2 = ""



Dim MEMO_CANCEL As Variant

MEMO_CANCEL = "4194304"

Call docMail.AppendItemValue("ActionInProgress", MEMO_CANCEL)

    docMail.Form = "Memo"

		

'a function to send an email

envoiWorkflow

Call uiDoc.close

Call workspace.editdocument(False, docMail)

End If

I think the problem is that the document is not already loaded and we try to modify it, and then client crashed. I tried to put all treatments in an agent on server but the client crashed also.

I’ve got no more idea … please help me… :slight_smile:

Thanks

Vincent