Comments (8)
Adding @annich-MS from the Outlook team.
from office-js.
@annich-MS did you manage to reproduce the issue with the provided example (simpleTestForNullProject.zip)?
from office-js.
It appears that you're attempting to create a deep linking scenario. This scenario is not officially supported in any version of outlook. You can request this feature in our User Voice
from office-js.
Hi, are you by chance attempting to get the itemid of an appointment that you are the organizer for? Currently items that you created open in compose mode. Per the documentation here:
The itemId property is not available in compose mode. If an item identifier is required, the saveAsync method can be used to save the item to the store, which will return the item identifier in the AsyncResult.value parameter in the callback function
This means that in add-ins being run on an calendar item that you created, you must get the itemid from saveAsync.
from office-js.
I can not use saveAsync on the item, because the item itself is null. I know that I can not just get the itemId in some cases, that's why my code looks like this:
window.currentItemID = Office.context.mailbox.item.itemId;
if (Office.context.mailbox.item.saveAsync) {
Office.context.mailbox.item.saveAsync(function (asyncResult) { // HOW TO GET THE ITEM ID
window.currentItemID = asyncResult.value;
initialStuff();
});
} else {
initialStuff();
}
This will throw the mentioned error: Uncaught TypeError: Cannot read property 'itemId' of null
from office-js.
I'm unable to repro this myself. Is there a way you can give me a gist that repros this?
from office-js.
I've created a simple test project to reproduce this.
Host the test.html
on https://localhost/test.html and load the add-in via the manifest (simpleAddin.xml
).
- Create a new mail and open the add-in (taskpane). It will write the item as
[Object, Object]
- all good here! - Create a new appointment.
- Copy the itemId from the object (the object is logged to console via the add-in).
- Open the following URL with your
EXCHANGE_SERVER_URL
and the copiedITEM_ID
:
https://
[EXCHANGE_SERVER_URL]
/owa/#ItemID=[ITEM_ID]
&exvsurl=1&viewModel=ICalendarItemDetailsViewModelFactory
- Open the add-in, it will print out
null
, as the item is null in this situation.
Test project files:
from office-js.
So no update yet?
from office-js.
Related Issues (20)
- Outlook 365 add-in not loading on MAC/OS new Outlook app. HOT 8
- Powerpoint Add-in is not updating automatically without any notification HOT 5
- Custom function handling of Entity Value is broken again HOT 4
- Office.context.roamingSettings.get() size limit HOT 2
- Word close API not working HOT 3
- Excel close is not working HOT 10
- Powperpoint close API HOT 4
- Manifest file sideloads on Excel web but does not sideload on Mac or Windows os HOT 2
- Opening dialog in iframe for an Excel custom function handler fails on alternate invocations HOT 6
- Outlook Add-in - Call to mailbox.getUserIdentityTokenAsync returning undefined token for only some Outlook accounts
- Assistance Needed with Outlook Add-In installing Manifest for older version of Outlook HOT 1
- MIME parts returned by getAsFileAsync() don't include Content-Disposition on Outlook Win32
- Permission under manifest file HOT 5
- Content copy pasted as table not being considered as body text using getAsync(Office.CoercionType.Text) HOT 3
- categories.addAsync is failing with operation not supported error in new outlook in windows HOT 1
- Outlook add-ins are not working for a Gmail account. HOT 1
- displayMessageFormAsync does not work in Mac HOT 1
- Way to turn off track changes from office documents HOT 7
- Create Presentation/Excel API HOT 3
- Highlight custom tab on opening document HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from office-js.