• v1.4 agent running with v1.3 code - Multiple addresses not being handled

    By Adam J Brewer 1 decade ago

    In the latest version of the Agent (1.4), it still doesn't seem like multiple addresses are being handled properly.

    Using the example spreadsheet included, the entirety of the cell is being copied to the To: field as is.  In other words, the draft email in Notes has "bsimpson@test.com|bsimpson2@test.com" in the address field -- it is not being properly split by using the pipe.

    ALT+ENTER linebreaks in Excel do not seem to work either.  Only the first entry in the cell is being copied.

    is there a bug in the Agent that would be causing this, or is there something else I can check?  I'm on Notes 8.5.3FP3.

    Thanks.

    • Troubleshooting ideas

      By David Turner 1 decade ago

      Hi Adam,

      I've not upgraded to 8.5.3 yet, but I'd be surprised if this was broken/changed due to the new Notes release.

       

      MMv1.4 includes a new function called: getRecipientList. This function is called when processing the 'TO','CC' and 'BCC' tokens via the MergeMemoCopy.replaceToken function. getRecipientList is simply designed to split the incoming text value into an array when it detects any char(10) or pipe-character, nothing too fancy. Then replaceToken will write the array into the corresponding Notes field of the draft email.

       

      A few things to check at your end:

      • Is the updated Create Mail Merge agent properly deployed to your mailbox?
        • Check the first alert dialog presented, the first line of the 2nd paragraph should include the version number of the Create Mail Merge agent (v1.4).
        • If the agent is deployed via a master template, ensure that the "No refresh" and "Inherits design" options are configured on the agent in your mailbox as required.
        • If you're using a local replica of your mailbox, ensure the design/agent is replicated.
      • Check for compilation problems in your mailbox.
        • In Domino Designer, check "Windows -> Show Eclipse Views -> Problems", to launch/view the 'Problems' panel. There should be no red 'x' or errors against the agent when deployed and compiled correctly in your mailbox.
        • Use "Tools -> Recompile all LotusScript" to ensure the agent code & classes are compiled correctly.
      • Review Notes Document fields.
        • Manually create a new draft email containing multiple addresses in order to compare the underlying 'fields' to the generated draft resulting from the mail-merge. To view fields in any Notes Document (such as your draft emails), select it and go to "File -> Properties" (or Alt+Enter), the Field values are listed on the 2nd tab. Note: It is simpler if you disable the 'Preview' pane (which generates a lot of temporary fields) before doing this. The "TO" token recipient fields to examine will be "SendTo" and "EnterSendTo". We might be able to assess whether there are any significant field changes between 8.5.2 and 8.5.3 which will require a code adjustment.
      • Debug the code in Notes.
        • Use "Tools -> Debug LotusScript", then run the agent to step through the code and view variables in the debugging console. Add a breakpoint in the MergeMemoCopy.replaceToken function (where the 'TO' token is replaced) and step through.

       

      Note: I have released the source code for v1.4 under the Documentation area if you'd like to double-check anything.

       

      Please check the above and advise if this solves the problem.

      • Troubleshooting efforts

        By Adam J Brewer 1 decade ago

        Hi David,

        Thanks for the quick response. Here are the results of my troubleshooting efforts:

        • Is the updated Create Mail Merge agent properly deployed to your mailbox?
          • Check the first alert dialog presented, the first line of the 2nd paragraph should include the version number of the Create Mail Merge agent (v1.4).
            • The dialog box presents itself as version 1.3.  However, I can't find any reason for this behavior to occur.  It is clearly version 1.4 of the Agent, and in checking the Constant variables, I see Const SCRIPTVERSION = "1.4".  I also see the new getRecipientList function in the Agent.
          • If the agent is deployed via a master template, ensure that the "No refresh" and "Inherits design" options are configured on the agent as you require.
            • I directly installed the Agents in my mail template using Domino Designer.  It's not deployed via a master template.
        • Check for compilation problems.
          • In Domino Designer, check "Windows -> Show Eclipse Views -> Problems", to launch/view the 'Problems' panel. There should be no red 'x' or errors against the agent when deployed and compiled correctly in your mailbox.
            • No Red X's or errors show in this pane. 
          • Use "Tools -> Recompile all LotusScript" to ensure the agent code & classes are compiled correctly.
            • No errors thrown when doing this.
        • Debug the code.
          • Use "Tools -> Debug LotusScript", then run the agent to step through the code and view variables in the debugging console. Add a breakpoint in the MergeMemoCopy.replaceToken function and step through.
            • I am not much of a programmer, but I was able to step through this.  For the email addresses that are separated by a Char-10, they were showing up in the Debugger variables as "email1@blah.comemail2@blah.com".  The final draft in Notes would only show email1@blah.com in the To: field and the others were dropped -- different than what the Debugger showed.  For ones separated with a pipe, the variable would show as "email1@blah.com|email2@blah.com".  Pipe-separated address would go into Notes just as shown in the Debugger.

         

        No dice so far.  Any other ideas?

        • Confirmed problem with release

          By David Turner 1 decade ago

          Hi Adam,

          Okay thanks for reporting this.

           

          I just put a fresh copy of the 1.4 Create Mail Merge agent in my mailbox with the same result you've reported. It appears to be a strange problem with my release package (perhaps a Designer bug?) where the underlying DXL ('lsa' file) is stuck on an older version of the agent, it doesn't match the actual agent code that you can see in Designer. I'll have to rebuild the package from scratch and re-release, I'll try to get to that today.

           

          To see this problem in your mail template in Designer, go to Code -> Agents, select the Mail Merge\Create Mail Merge agent, then go Tools -> Edit with DXL. In the block you will see an older  SCRIPTVERSION, not the current one (1.4).

           

          Quick fix is to open the normal Agent LotusScript code editor and make a dummy modification (e.g. add a space and delete it) and save your agent in your mailbox to have it recompile, this seems to work for me.

           

          Also, as a workaround, you can get a copy of the agent source code from this project's Documentation area, you might have some success if you want to paste that over the top and save.

           

           

          • 1.4.1 works great!

            By Adam J Brewer 1 decade ago

            Hi David,

            I completely deleted the agent and reinstalled and it works beautifully now.

            Thanks for all your efforts in maintaining, writing, and supporting the agent.  It will save me hour of work today.  Thank you!

    • Packaging problem fixed in v1.4.1

      By David Turner 1 decade ago

      Thanks Adam,

      Confirmed problem with the packaged NSF file for the v1.4 release, this has been fixed and re-released in 1.4.1 (no code changes).

       

      To see if your installation is affected, check the first alert dialog presented, the first line of the 2nd paragraph should include the version number of the Create Mail Merge agent (v1.4+), not the older v1.3.

       

      Fix is to install the agents from the new v1.4.1 package, or a workaround would be to modify and save the agent code (after you've copied it to your mailbox) to force it to recompile with the 1.4 code with the additional features.