How do I show the "to" header contents near the subject? - outlook

When I open a mail, either by single or double clicking it (the later resulting in the mail being opened in a dialog), I want to be able to read the "To" header contents in the field where I can see the subject and the sender (and also the senders avatar if any).
How do I do that?

Related

Hiding Recipients in a qbo3 Message/Search panel

When using qbo3's Message/Search panel in a landing page to announce system changes to all users, every user that has acknowledged the message is appearing underneath the message, like this:
How can I disable the rendering of recipients, as this list will get very long?
When rendering a Message/Search panel, you may specify which behaviors you want displayed. In this case, the key is to omit the Recipient behaviors, such as:
Message/Search?Behaviors=Selectable ParentLabel Labels TabLauncher MessageAttachments Unread
For a report landing page, this API call is typically defined in the Search Panel field:
A quick recap of the behaviors listed here:
Behavior
Description
Selectable
Enable multi-selection of rows by clicking on a row, and then shift-clicking on a later row to select all rows between the two selected.
ParentLabel
If a Message is bound to a parent object, execute an API call to get the friendly label of the parent object.
Lables
Enable display of any labels each Message is tagged with.
TabLauncher
Enable popping out of the Message/Summary into a panel to the right of the Message/Search panel.
MessgeAttachments
Display a link to any attachments associated with each messages.
Unread
Marks any unread message with a css style (defaults to messageunread).

VSTO Outlook: Handle event when a new email address has been added to "TO" field in the compose window and then change the email address

In compose window I would like to handle the event that is produced just when the user has entered a new email address (recipient) into the "TO" field. After that I would like to modify the email address by applying it an html format and a style such as below:
<html><body><span style="color:red">foo#foo.com</span></body></html>
The purpose of it is to make this email address get shown as red.
How can I subscribe to MailItem PropertyChanged event as explained here:
Outlook VSTO recipients changed event
I want to do exactly the same, process the recipients in the "TO" field.
so in case it is possible, how can achieve that? and is Outlook able to parse that html format?
how can achieve that? and is Outlook able to parse that html format?
It is not possible, the Outlook extensibility model doesn't provide anything for customizing the recipients list (the To or Cc fields). The best what you could do is to replace the inspector view with your own form, see Advanced Outlook view and form regions for possible layouts, but I guess you will be interested in the CompleteReplacement layout. Note, in that case you will have to implement all the required functionality on your own.

Unable to limit the edit of the "amount" field up to 2 decimal places on "Price List Item" entity in MS CRM 365

On "Price List Item" entity, we have an "amount" field of type currency. We require limiting the user to enter the amount in that field up to 2 decimal places only. Example, if the user wishes to enter 100.100 then he should not be able to write only up to 2 decimal places ie. 100.10Image shows the invalid value allowed to enter
It's not possible without doing something unsupported. You can attach to the key press event of a text field, but not any other type of field.
If you wish to follow a dark and dangerous path, aka the unsupported route (and note that I do not advise this), you can still attach to the underlying inputs. Using something like this in jquery for example:
function onload()
{
$("#amount_i").keypress(...);
}
But that's a rabbit hole I shall not venture down any further. In regard to CRM I'm very much a blue pill kind of guy.
You can hide the field and insert a HTML webresource mimicking the field. In a HTML web resource you are free to manipulate the DOM (i.e. limiting input) without risking breaking anything in the form itself.
If you include the ClientContext.js.aspx in the web resource, you can then copy what's entered in the "fake" field to the "real" field (via parent.Xrm, remember to uncheck 'Prevent cross-frame scripting').
This has the benefit of not requiring tampering with the form's DOM, and an HTML page with a single input field shouldn't be that hard to implement.

VSTO: How do I cast a mailitem as a form?

If I have an Outlook.MailItem how can I get the Location, Width and Height of this?
Also I need to "disable" the entire Outlook.MailItem form - how do I do this?
I want to show a centered "modal" dialog (just a Windows.Forms.Form) over this MailItem without it actually being modal.
Thanks
Update (more explaining)...
When a user clicks "Send" on a mail, I want to check it for large files before sending and if the file size are too big, then I want to show a "Files are too big, do you want to zip them" dialog. The dialog must be centered to the mail form and disable the mail form (like a dialog would) without freezing outlook.
There is no need to disable the default form in Outlook.
For example, the Open event of the MailItem class which is fired when an instance of the parent object is being opened in an Inspector. The Cancel parameter passed to the event handler allows to abort the default action. If the event procedure sets this argument to True, the open operation is not completed and the inspector is not displayed.
When this event occurs, the Inspector object is initialized but not yet displayed. The Open event differs from the Read event in that Read occurs whenever the user selects the item in a view that supports in-cell editing as well as when the item is being opened in an inspector.
Also you may consider using Outlook form region. The Replacement-all layout allows to override the whole inspector window. See Creating Outlook Form Regions for more information.
Why do you need to do anything with the form? Process the Application.ItemSend event, display the prompt if necessary, and cancel the submission process if you need to.

Create new document with autofilled field - Lotus Script

I'm not sure, that title is correct, but i'll try to describe my qyestion in more detail.
What i have?
In Lotus db i have view V1 with two columns - names and address. Also i have two forms (for simplicity - F1 and F2). F1 has two fields: "Recipient" (names) and Title (text string) and Button "Send". F2 also has field Title (text string). After opening DB person can choose one document from view V1 and press button "Create", which creates new document on F1, where field Recipient takes chosen address from view V1. Then person fills field Title and press button "Send" to send message for Recipient with doc.Subject = Title . On this stage everything is clearly understandable
What i need?
In this mail, Recipient should receive link for creating new document on form F2, with automatic filling for the field "Title" with the "Subject" value from this mail.
Notes has a feature called "Send form in document". I would use that feature when I send the message to the user. The message that you send would not be an ordinary "Memo". It would actually be a custom form with a button that contains your code, and it would appear in the recipient's Inbox just like an ordinary email.
To do this, I would create another form F3. This is the form that you will email. Add whatever fields you want to this form. Also add a button with code to open your database, create a document using F2, and populate the fields of F2 with the data that you sent in F3.
Then go into F1 and modify the code that is sending the message. (Since you haven't shown any of your code, I'm assuming in your LotusScript code you have named the NotesDocument variable "msg".) Change it to set msg.Form="F3", and then in your call to msg.Send be sure to set the first argument to true. This will activate the store form in document feature, so the recipient will get a copy of F3 included inside the message, and the button will be functional.
This is how I would solve it:
A document ("Doc1") is created using Form1.
The fields are populated and the 'Send' button is clicked.
The 'Send' button will create a new document ("Doc2") using Form2.
The code will populate the 'Title' field on "Doc2" with the value of 'Title' on "Doc1", and create a new email. The email will contain a doclink to "Doc2", so the recipient can click on it to open the document.
Save "Doc1" and "Doc2" and close both documents.
Use the AppendDocLink method of the NotesRichTextItem class to create the doclink.

Resources