Modifications to Attachments are not reflected in the Inspector when made using Redemption Safe* Objects - outlook-redemption

I'm using Redemption Safe* Objects to modify the attachments in an email in the ItemSend event.
In some situations we want to add an extra attachment and cancel the sending so that the user can review the changes. However the changes are not visible in the Inspector window until Outlook has been restarted. I've tried reopening the Inspector but this is not working.
Is there anyway I can get Outlook to display these changes without restarting Outlook?
Thanks

This is to be expected - Outlook does not see changes made with MAPI (and Redemption) until the item in question is completely de-referenced and reopened.
Since adding attachment is not blocked (only reading some of them is), you can make the modifications using the Outlook Object Model.

Related

Office.Js best method for notifying and syncing end user of updates from another system

Office.JS is presenting some challenges that seem to end in the same you can't do that loop.
We have a system that's used to create appointments and tasks based on certain variables. What we're struggling with is the best method to sync those events/appointments to the end user.
We've landed with sending the user letting them know there is pending items, but is there a way to embed office.js into the email to open the task pane to sync the two systems?
I know event-based exists, but forcing a sync when composing any email seems crazy. https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/autolaunch
Is there a better way?
There is no way to open a task pane programmatically from Outlook web add-ins.
A task pane can be displayed by using the following mechanisms that require end user actions as well:
A ribbon button can be assigned to open a task pane.
A notification message can be configured programmatically at runtime to open a task pane.
If you need to synchronize items in Outlook I'd suggest handling onSend event (or smart alerts) where you can read all the data of an item being sent and sync it with your back end server. Also you may consider using Graph API for syncing all items, not only the current one.
Outlook web-based add-ins are designed to work for a particular (currently selected) item only. And they are still very limited, comparing to VSTO add-ins, in customizing the Outlook UI.

getWorkItemRelations() not always return active data

I have a custom control that shows the hyperlinks related to the active Work item. To do this, I call the getWorkItemRelations() and almost always works fine. My problem is when I delete a Link and the refresh in my custom control is called the result array includes the deleted "Links". In the Link tab the deleted Link was removed.
I review the resulting array for a flag that indicates if the Link was deleted but it doesn't exists.
Also, I put a button to refresh the data in my custom control but the result is the same.
Are there a way that I can force to full reload the relationships for the Work Item?
This phenomenon maybe related to the data caches on client computers. You could give a try with refresh the Work Item Cache.
To update the cache for tracking work items, you invoke the
StampWorkitemCache Web method. This method forces client computers to update the cache the next time that they connect to the
application-tier server. This method also synchronizes the workspaces
that are defined on the client computers.
To refresh the cache for tracking work items on client computers:
On the new server, open Internet Explorer.
In the Address bar, enter the following address to connect to the
ClientService web service:
http:// PublicURL/VirtualDirectory :8080/WorkItemTracking/v3.0/ClientService.asmx
Choose StampWorkitemCache, and then choose Invoke.
Note: To invoke the StampWorkitemCache Web method, you must be a member of the Administrators security group on the application-tier server for Team Foundation.
More details info about the method please refer the official documentation: Refresh the Work Item Cache
Update
Every changes on the work item need to be saved. Unlike UI on the web,it's not a real-time display. You need to save the work item , then refresh in your custom control .

Is there any way to handle native send of outlook appointment from add-in through Office.js?

To get Item Id in appointment compose mode i am using "saveAsync" in add-in the problem is with out user intervention the appointment item is saving to the MS Exchange.After discarding the opened appointment (by using office cancel "X" button) still the changes which i made while "saveAsync" execution are presented, it's not regaining the previous state.
I need to know is there any way to bring back the previous state of appointment if user click on discard ?
(OR)
Any way to handle the native send of outlook appointment from add-in through the office.js after "saveAsync" got applied ?
(OR)
Is there any other way of getting the Item Id of appointment in compose mode through the Office.js ?
Please,answer if you know how to handle any of these cases.
EDIT: Looks like at this time, it is not possible to revert to last saved version via the add-in, nor is there any way to get the itemId without saveAsync
Old Answer
If you are modifying an existing appointment, you can get the ItemID by calling Office.context.mailbox.item.itemId, however if you are creating a new appointment, you must call saveAsync in order for your appointment to be registered, and thereby given an ItemId.

How to check if Outlook has finished sending an email with an attachment?

Our Delphi application uses Outlook programmatic access when a user needs to send reports as PDF's to their customers. Normally there are no issues but there are a few reports where each customer gets their own copy and errors are being reported by Outlook when the number of customers is over 100.
We did track down the problem to Outlook not being able to create more than 100 temporary copies of the same attachment name, due to the auto-numbering it uses. This blog entry has a good example of the issue.
http://chentiangemalc.wordpress.com/2011/05/08/case-of-the-outlook-attachment-open-fail/
The preferred solution is to delete the files from the OutlookSecureTempFolder, however we can't do this during the processing as sometimes Outlook hasn't actually finished sending the email before we delete the temp file, which causes a similar error.
Is there a way to know, after you use .Send, when Outlook has actually sent the email and it is safe to delete the temp file? There does not seem to be any callback or event we can hook into.

How do I request that a work item owner add more details to the work item and keep the history?

In TFS, how do I request more information from the owner of a work item and have my request appear in the work item history?
So for example a user submits a bug, then I would like to use TFS to request more information and I would like my request to be within or attached to the bug. Then would like the user to update the bug in a way that I can see the progression.
Similarly is there a way to notify the user that I have updated the bug (without explicitly sending them a manual email)?
So I would like this to be outside the context of a daily standup meeting and a more automated process.
You could add a new state or reason, with a piece of workflow that assigns the work item back to the creator automatically and have a email alert on assigned to changes to [me]. However I normally just manually assign it to someone and ask for more details in the history.

Resources