Why do we need to upload a file D365?
Consider a business scenario where we need to explicitly call a file upload wizard and perform a dedicated set of operations. There are multiple ways to achieve this requirement, but we will go with the easiest way for uploading files in Dynamics 365 as given below.
Using pickFile client API reference to upload the file –
We will use the Microsoft’s pickFile client API to achieve the file upload requirement.
Xrm.Device.pickFile(pickFileOptions).then(successCallback, errorCallback)Opens a dialog box to select files for the upload.
This method is supported for both web and mobile clients.
Note: – The below code is been triggered during the OnChange event of form’s field.
Validating the output in Dynamics 365 –