Closed matejskubic closed 6 months ago
Describe the bug As per documentation of the openFile has a parameter openFileOptions. This type must have a property named openMode.
openFile
openFileOptions
openMode
The current implementation has openFileOptions defined as enum - this must be an interface with property openMode with such enum.
enum
interface
To Reproduce Steps to reproduce the behavior:
await Xrm.Navigation.openFile(fileOptions, Xrm.OpenFileOptions.Save);
Actual behavior The file is not saved. Error message: This attachment can not be opened on your device.
This attachment can not be opened on your device.
Expected behavior The file should be saved.
await Xrm.Navigation.openFile(fileOptions, { openMode: Xrm.OpenFileOptions.Save });
Environment
Additional context
https://github.com/delegateas/XrmDefinitelyTyped/blob/dcdcdc0e6efc2f8f22433631008e39c0af0b095e/src/XrmDefinitelyTyped/Resources/Extensions/xrm_ext_9-.d.ts#L638
https://github.com/delegateas/XrmDefinitelyTyped/blob/dcdcdc0e6efc2f8f22433631008e39c0af0b095e/src/XrmDefinitelyTyped/Resources/Extensions/xrm_ext_9-.d.ts#L249
Opened a discussion at https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/68991
Describe the bug As per documentation of the
openFile
has a parameteropenFileOptions
. This type must have a property namedopenMode
.The current implementation has
openFileOptions
defined asenum
- this must be aninterface
with propertyopenMode
with such enum.To Reproduce Steps to reproduce the behavior:
Actual behavior The file is not saved. Error message:
This attachment can not be opened on your device.
Expected behavior The file should be saved.
Environment
Additional context
https://github.com/delegateas/XrmDefinitelyTyped/blob/dcdcdc0e6efc2f8f22433631008e39c0af0b095e/src/XrmDefinitelyTyped/Resources/Extensions/xrm_ext_9-.d.ts#L638
https://github.com/delegateas/XrmDefinitelyTyped/blob/dcdcdc0e6efc2f8f22433631008e39c0af0b095e/src/XrmDefinitelyTyped/Resources/Extensions/xrm_ext_9-.d.ts#L249