/ Forums / Advansys Formativ / Creating Solutions with Formativ / Attachments.Add not working in V2.02 and GW8

  • Creator
    Topic
  • #4425
    Marco
    Participant

      We have just switched from Groupwise 7 to Groupwise 8 and so I installed Formativ V2.02 Beta.
      Most of our applets are running well but one is not working anymore. This applet is using the .Attachement.Add method with a selected message in Groupwise.

      Is this an error in Formativ V2.02 Beta?
      Or an error in Groupwise 8?
      Or is there an change in the GW8 interface?

      I have break down the applet into a short example reproducing the bug very easily:


      Sub Main(Client, GWEvent)
      dim Msg
      dim MyNewtask
      dim i
      dim index
      dim Kategorien
      dim TaskPrio
      dim TaskCat
      dim Bu

      On Error Resume Next
      Set Msg = Client.ClientState.CommandMessage
      If Msg Is Nothing Then
      exit sub
      End If
      On Error Goto 0

      set MyNewTask = GroupWise.Account.Calendar.Messages.Add(“GW.MESSAGE.TASK”, fgwPersonal)
      With MyNewTask
      ‘.FromText = GroupWise.Account.Owner.DisplayName
      .FromText = Msg.FromText
      ‘.OnCalendar = FALSE
      ‘.Priority = fgwNormal
      .AssignedDate = today
      .StartDate = today
      .DueDate = today
      ‘.Completed = FALSE
      .Subject = “New job”

      .TaskCategory = “A”
      .TaskPriority = 1

      .Attachments.Add(Msg) ‘ <<— Error
      End With

      set MyNewtask = nothing

      Set Msg = nothing
      End Sub

    • Author
      Replies
    • #8148
      Support 3
      Participant

        Sample code above works in GroupWise 7.0.3 (build date 08/05/2009) but failed in GroupWise 8.0.1 (build date 26/08/2009).

        Looks like a bug in GroupWise 8 client, we will report this to Novell.

        Regards,
        Advansys Support

        #8151
        Marco
        Participant

          Hi,

          Is there any progress from Novell?

          Or do you know any workaround for me?

          regards

          #8149
          Support 3
          Participant

            We have reported this issue to Novell but haven’t heard any response yet. You can also post GroupWise Object API related questions into the following forum:
            http://groups.google.com.au/group/novell.devsup.gwobjapi?hl=en

            In regards to alternative approach, you could consider to use Token API to add attachment. See ItemAttachmentAdd for more information.

            Regards,
            Advansys Support

            #8150
            Marco
            Participant

              Hi,

              I have found a workaround, which works for me:
              Using a draft message (fgwDraft instead of fgwPersonal) you can add attachments.
              This will not create a posted task, but a normal task which I have assigned to myself.

              set MyNewTask = GroupWise.Account.Calendar.Messages.Add(“GW.MESSAGE.TASK”, fgwDraft)
              With MyNewTask
              .FromText = GroupWise.Account.Owner.DisplayName
              ‘.OnCalendar = FALSE
              ‘.Priority = fgwNormal
              .AssignedDate = today
              .StartDate = today
              .DueDate = today
              ‘.Completed = FALSE
              .Subject = “New job”
              .TaskCategory = “A”
              .TaskPriority = 1

              .Attachments.Add(MyMsg)
              End With

              MyNewTask.Recipients.Add(GroupWise.Account.Owner.DisplayName)
              MyNewtask.Send

              set MyNewtask = nothing

              best regards
              Marco

              #8152
              Support 3
              Participant

                Great news, thanks for sharing the idea.

                Regards,
                Advansys Support

              Viewing 5 replies - 1 through 5 (of 5 total)
              • You must be logged in to reply to this topic.