Search This Blog

Sunday, March 23, 2014

Magic of "Present mail send dialog" form property

Hello guys

Today I have got a question from my manager: why SendTo/CopyTo/... fields in a standard Lotus Notes mail are capable to resolve all names whatever and whenever you type them in but our own SendTo/CopyTo/... fields work not exactly the same. What is the difference?

Really, what is the difference?

If you create a new Memo and type your shortname or your internet address or any other alias that is associated with you in a Domino Directory into SendTo field
and then press F9 all these names will be transformed to your Notes Name in abbreviated form (sometimes with @DominoDomain part in the end, sometimes without). Notice, the same names are unified to a single value.

However if you create a blank Notes Form and add there your SendTo field with the same properties enabled as Memo 'SendTo' field has...



you will find that it does not work the same:
- F9 does not affect on anything (it will work if you enable property "Look up addresses on document refresh" on the 2nd tab of the field properties but we are testing with the same properties as Memo SendTo has), only Enter key works
- shorname or any other aliases will not be always transformed to your Notes Name in abbreviated form, especially if you type it in the beginning, like: pua, Yuriy Pastovenskyy/SomeOrg.
- even if some of the aliases are transformed to abbreviated Notes Name on pressing Enter, they will not be unified to a single value, you will get the same Notes name a few times.

To make your SendTo field working the same as standard Mail SendTo does you have to enable form property "Present mail send dialog"

After that your field will work the same.

Besides that this form property enables a lot of additional things which are not obvious and sometimes unexpected:
- If you have fields SendTo and CopyTo and you enter the same recipient in both of them, then on any refresh the recipient will be removed from CopyTo
- If you have fields EnterSendTo and SendTo and you enter any value into the first field then on any refresh the same value will be automatically added to the second field
- ... I am sure that there are more hidden things which start to work when that form property is enabled....

However it does not have any practical sense, at least I do not see it:
- the 'magic' works only for fields with names SendTo/CopyTo/BlindCopyTo or EnterSendTo/EnterCopyTo/EnterBlindCopyTo - you will not get the same behavior for fields with different names, event if they have exactly the same properties enabled.
- you don't want to get "Mail send dialog" window on every close of your document




1 comment:

  1. Hi Yuriy, great posts. I have a question regardin NotesApi, I hope you can help me.

    In my database was changed the Memo template and when I send an email it works perfect, but when I use NotesApi it uses the original template; I set the field "Form" to use the new template but seems does not take effect, do you have an idea how can force to use the new template.

    Thanks in advance,

    Regards
    Gustavo Leal

    ReplyDelete