@@ -2618,15 +2618,12 @@ methods:
2618
2618
package : outlook!
2619
2619
fullName : ' getItemIdAsync(options, callback)'
2620
2620
summary : >-
2621
- Asynchronously gets the ID of a saved item.
2621
+ Asynchronously gets the [Exchange Web Services (EWS) item
2622
+ identifier](https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange)
2623
+ of a saved item.
2622
2624
2623
2625
2624
2626
When invoked, this method returns the item ID via the callback function.
2625
-
2626
-
2627
- **Note**: If your add-in calls `getItemIdAsync` on an item in compose mode (e.g., to get an `itemId` to use
2628
- with EWS or the REST API), be aware that when Outlook is in cached mode, it may take some time before the item is
2629
- synced to the server. Until the item is synced, the `itemId` is not recognized and using it returns an error.
2630
2627
remarks : >-
2631
2628
\[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \]
2632
2629
@@ -2641,6 +2638,19 @@ methods:
2641
2638
-->**: Appointment Organizer
2642
2639
2643
2640
2641
+ **Important**:
2642
+
2643
+
2644
+ - The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. Before
2645
+ making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`<!--
2646
+ -->.
2647
+
2648
+
2649
+ - If your add-in calls `getItemIdAsync` (for example, to get an item ID to use with EWS or the REST API), be aware
2650
+ that when Outlook is in cached mode, it may take some time before the item is synced to the server. Until the item
2651
+ is synced, the item ID isn't recognized and using it returns an error.
2652
+
2653
+
2644
2654
**Errors**:
2645
2655
2646
2656
@@ -2660,7 +2670,8 @@ methods:
2660
2670
- id : callback
2661
2671
description : >-
2662
2672
When the method completes, the function passed in the `callback` parameter is called with a single parameter
2663
- of type `Office.AsyncResult`<!-- -->.
2673
+ of type `Office.AsyncResult`<!-- -->. The EWS item ID of the item is returned in the `asyncResult.value`
2674
+ property.
2664
2675
type : ' (asyncResult: <xref uid="office!Office.AsyncResult:interface" /><string>) => void'
2665
2676
return :
2666
2677
type : void
@@ -2670,15 +2681,12 @@ methods:
2670
2681
package : outlook!
2671
2682
fullName : getItemIdAsync(callback)
2672
2683
summary : >-
2673
- Asynchronously gets the ID of a saved item.
2684
+ Asynchronously gets the [Exchange Web Services (EWS) item
2685
+ identifier](https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange)
2686
+ of a saved item.
2674
2687
2675
2688
2676
2689
When invoked, this method returns the item ID via the callback function.
2677
-
2678
-
2679
- **Note**: If your add-in calls `getItemIdAsync` on an item in compose mode (e.g., to get an `itemId` to use
2680
- with EWS or the REST API), be aware that when Outlook is in cached mode, it may take some time before the item is
2681
- synced to the server. Until the item is synced, the `itemId` is not recognized and using it returns an error.
2682
2690
remarks : >-
2683
2691
\[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \]
2684
2692
@@ -2693,6 +2701,19 @@ methods:
2693
2701
-->**: Appointment Organizer
2694
2702
2695
2703
2704
+ **Important**:
2705
+
2706
+
2707
+ - The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. Before
2708
+ making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`<!--
2709
+ -->.
2710
+
2711
+
2712
+ - If your add-in calls `getItemIdAsync` (for example, to get an item ID to use with EWS or the REST API), be aware
2713
+ that when Outlook is in cached mode, it may take some time before the item is synced to the server. Until the item
2714
+ is synced, the item ID isn't recognized and using it returns an error.
2715
+
2716
+
2696
2717
**Errors**:
2697
2718
2698
2719
@@ -2705,15 +2726,16 @@ methods:
2705
2726
```TypeScript
2706
2727
2707
2728
// Link to full sample:
2708
- https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/85-tokens-and-service-calls /item-id-compose.yaml
2729
+ https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis /item-id-compose.yaml
2709
2730
2710
2731
2711
- Office.context.mailbox.item.getItemIdAsync(function (result) {
2712
- if (result.status !== Office.AsyncResultStatus.Succeeded ) {
2732
+ Office.context.mailbox.item.getItemIdAsync((result) => {
2733
+ if (result.status === Office.AsyncResultStatus.Failed ) {
2713
2734
console.error(`getItemIdAsync failed with message: ${result.error.message}`);
2714
- } else {
2715
- console.log(result.value);
2735
+ return;
2716
2736
}
2737
+
2738
+ console.log(result.value);
2717
2739
});
2718
2740
2719
2741
```
@@ -2725,7 +2747,8 @@ methods:
2725
2747
- id : callback
2726
2748
description : >-
2727
2749
When the method completes, the function passed in the `callback` parameter is called with a single parameter
2728
- of type `Office.AsyncResult`<!-- -->.
2750
+ of type `Office.AsyncResult`<!-- -->. The EWS item ID of the item is returned in the `asyncResult.value`
2751
+ property.
2729
2752
type : ' (asyncResult: <xref uid="office!Office.AsyncResult:interface" /><string>) => void'
2730
2753
return :
2731
2754
type : void
@@ -3449,9 +3472,16 @@ methods:
3449
3472
`saveAsync` may not result in the same content.
3450
3473
3451
3474
3452
- - If your add-in calls `saveAsync` on an item in compose mode in order to get an item ID to use with EWS or the
3453
- REST API, be aware that when Outlook is in cached mode, it may take some time before the item is actually synced
3454
- to the server. Until the item is synced, using the item ID will return an error.
3475
+ - The identifier returned is the same as the [Exchange Web Services (EWS) item
3476
+ identifier](https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange)<!--
3477
+ -->. The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. Before
3478
+ making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`<!--
3479
+ -->.
3480
+
3481
+
3482
+ - If your add-in calls `saveAsync` to get an item ID to use with EWS or the REST API, be aware that when Outlook
3483
+ is in cached mode, it may take some time before the item is actually synced to the server. Until the item is
3484
+ synced, using the item ID will return an error.
3455
3485
3456
3486
3457
3487
- In Outlook on Mac, only Version 16.35 (20030802) and later supports saving a meeting. Otherwise, the `saveAsync`
@@ -3501,8 +3531,8 @@ methods:
3501
3531
- id : callback
3502
3532
description : >-
3503
3533
When the method completes, the function passed in the `callback` parameter is called with a single
3504
- parameter, `asyncResult`<!-- -->, which is an `Office.AsyncResult` object. The appointment ID is returned in
3505
- the `asyncResult.value` property.
3534
+ parameter, `asyncResult`<!-- -->, which is an `Office.AsyncResult` object. The EWS appointment ID is
3535
+ returned in the `asyncResult.value` property.
3506
3536
type : ' (asyncResult: <xref uid="office!Office.AsyncResult:interface" /><string>) => void'
3507
3537
return :
3508
3538
type : void
@@ -3546,9 +3576,16 @@ methods:
3546
3576
`saveAsync` may not result in the same content.
3547
3577
3548
3578
3549
- - If your add-in calls `saveAsync` on an item in compose mode in order to get an item ID to use with EWS or the
3550
- REST API, be aware that when Outlook is in cached mode, it may take some time before the item is actually synced
3551
- to the server. Until the item is synced, using the item ID will return an error.
3579
+ - The identifier returned is the same as the [Exchange Web Services (EWS) item
3580
+ identifier](https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange)<!--
3581
+ -->. The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. Before
3582
+ making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`<!--
3583
+ -->.
3584
+
3585
+
3586
+ - If your add-in calls `saveAsync` to get an item ID to use with EWS or the REST API, be aware that when Outlook
3587
+ is in cached mode, it may take some time before the item is actually synced to the server. Until the item is
3588
+ synced, using the item ID will return an error.
3552
3589
3553
3590
3554
3591
- In Outlook on Mac, only Version 16.35 (20030802) and later supports saving a meeting. Otherwise, the `saveAsync`
@@ -3598,8 +3635,8 @@ methods:
3598
3635
- id : callback
3599
3636
description : >-
3600
3637
When the method completes, the function passed in the `callback` parameter is called with a single
3601
- parameter, `asyncResult`<!-- -->, which is an `Office.AsyncResult` object. The appointment ID is returned in
3602
- the `asyncResult.value` property.
3638
+ parameter, `asyncResult`<!-- -->, which is an `Office.AsyncResult` object. The EWS appointment ID is
3639
+ returned in the `asyncResult.value` property.
3603
3640
type : ' (asyncResult: <xref uid="office!Office.AsyncResult:interface" /><string>) => void'
3604
3641
return :
3605
3642
type : void
0 commit comments