...
...
Good day. I have a simple upload dialog implemented within my own custom form. Right after browsing, the upload starts. I have put an info just to see if it completes uploading, and it does. Upon clicking "OK", however, fileUploadResult returns null. Here is the code:
[Form]
public class PurchReqUploadFileDialog extends FormRun
{
FileUploadTemporaryStorageResult fileUploadResult;
[Control("Custom")]
class FileUpload1
{
public void OnUploadCompleted()
{
info(strFmt("Upload Completed"));
fileUploadResult = this.getFileUploadResult() as FileUploadTemporaryStorageResult;
super();
}
}
[Control("CommandButton")]
class OKCommandButton
{
public void clicked()
{
MenuFunction uploadMenuFunction;
Args args = new Args();
super();
if(fileUploadResult != null && fileUploadResult.getUploadStatus())
{
args.parmObject(fileUploadResult);
uploadMenuFunction = new MenuFunction(identifierStr("MyActionMenuItem"), MenuItemType::Action);
uploadMenuFunction.run(args);
}
else if(fileUploadResult == null) //just to test if this is being the problem, and it is
{
info(strFmt("fileuploadresult is null"));
}
else
{
info(strFmt("fileuploadresult is not null")); //or if getUploadStatus() is the problem
}
}
}
}
As seen in the photos above, fileUploadResult returned null, causing my action menu item that calls a class to not be called. I have initialized and started my AzureStorageEmulator without any problems (as far as I can see. No errors on cmd). I really cannot pinpoint if it were the AzureStorageEmulator that's causing the problem, or if something in this code needs fixing. Do I need to setup anything else regarding the storage emulator other than initializing and starting it? Does my Visual Studio need to be closed while I initialize or start my storage emulator? Any help will be very much appreciated. Thank you!