Running EXE with parameters from Acumatica - acumatica

I need help in trying to execute an executable with parameters from my acumatica application.
I want to run a Windows Forms application from screen acumatica. My Windows Forms application is hosted in my local server and the Acumatica website is hosted on Acumatica SaaS platform.
Best regards.

The simplest method is to associate a file type to your program:
https://stackoverflow.com/a/52009412/7376238
Then you can parse the file as a parameter in the main method:
https://stackoverflow.com/a/36819292/7376238
In an Acumatica action event handler, throw a file redirection to open the program:
https://stackoverflow.com/a/46796335/7376238
Another method is to register a URI scheme handler for your program in Windows:
URI scheme launching
Those are special URL that can open a Windows program with parameters. A common example is the 'mailto' URI scheme that opens a email client. Example: mailto:email#domain.com
In an Acumatica action event hander, throw a URL redirection to open the program:
https://stackoverflow.com/a/54540253/7376238

Related

Is HTTP PUT access required for uploading to SharePoint via the SaveBinaryDirect method?

We have developed a .NET console application to do file uploading to a SharePoint 2016 document library. The application was built using the Microsoft.SharePoint2016.CSOM library, with file uploading using on the Microsoft.SharePoint.Client.File.SaveBinaryDirect() method call.
Based on results from a web vulnerability scanning, there was a request that the “HTTP PUT method” should be disabled in IIS. However after some testing, we found that
If “HTTP PUT” is enabled, the file upload is successful
If “HTTP PUT” is disabled, the console application would return a 404 error from the file uploading step
We would like to confirm whether “HTTP PUT method” is necessary (and cannot be disabled) for the SharePoint CSOM SaveBinaryDirect() method.
If you use Fiddler to monitor the request, you can find it's PUT request.
First of all, to access the SharePoint services(rest/web) the user should be authenticated. Its not like anyone can upload a file. People can use POST instead of PUT for uploading etc. So I am not sure what type of quality check you are using.
These are the out of the box services SharePoint is providing and I have seen very big enterprises using it without the changes you have suggested.

How to use dropbox API from chrome extension content script?

If I write a chrome extension, it normally consist of multiple parts:
One is the devtools page which is a normal HTML page with origin set to
"chrome-extension://<guid>/filename". On that page I can use
the Dropbox API to get user confirmation via HTML popup and then use
the saved auth info and do all work via the Dropbox javascript library.
Another part of extension is the content script which is executed
in the context of specified third-party web pages ("injected") and have
origin cookies and web storage shared with them.
Is it possible to also use the Dropbox JavaScript library in that content script?
I can't call authenticate in interactive mode since it will re-ask for confirmation for each different webpage I'm injected into. And calling authenticate without interactive will fail since the content script doesn't share the origin, cookies and web storage with the devtools extension page :(. Maybe there's some way to "pass" the Dropbox auth info from the part of the extension that offers GUI and where user successfully confirms dropbox usage to the parts of the extension that are GUI-less, like content script or background page?
I have managed to get Facebook working from code injected into a web app via a content script. I suspect there are multiple ways, but what I did was take advantage of the chrome.identity API to do the OAuth work for me, specifically the launchWebAuthFlow().
This can only be done in the background page (in my case an event page), but I send messages to the event page which replies with the access_token, which can then be used in URLs in the same was as the 'web' technique - i.e. in HTTP requests with XHR.
You can send/receive messages via the content script (using events on document), but I decided to do it directly using "external" messages with the chrome.runtime.sendMessage() API in the web app context, and chrome.runtime.onMessageExternal() in the background script. This requires adding "matches" for the URLs you're injecting code into in an "externally_connectable" section of the manifest.json.
I believe this can be adapted to make it work with Dropbox.

XPages error when running in web browser and saving new document

So I've finally move my application from development(inaccessible through internet) server to production(accessible through internet) server and I got the following runtime error whenever I'm trying to save a document:
Error while executing JavaScript action expression
Script interpreter error, line=23, col=10: [TypeError] Exception occurred calling method NotesXspDocument.save() not allowed to access or modify file: C:\WINDOWS\TEMP\notesC053A6\xsppers\22\DHRRDLYBXJ
not allowed to access or modify file: C:\WINDOWS\TEMP\notesC053A6\xsppers\22\DHRRDLYBXJ
I've done some testing to see where this would occur and found that it only happen when running the application in a web browser (including the Notes 9 web browser) and creating a new document and saving it.
If I run the application via XPiNC, create a new document and save, I'm able to save the document. And this document can later be edited and saved whether in XPiNC or web browser.
I'm not aware of this problem because during development I usually only test in notes client. When it come to web browser, I'll just create a local copy to test because the development server does not allow access through web browser.
Is there any server setting that I should change? I'm not admin but I could inform my boss to change. Thanks.
EDIT
After further testing, I found that uploading a file could be causing the problem. My XPage has fileUpload control for user to upload attachment with the document. But since it worked on XPiNC I need to know why it doesn't work in web browser and the solution to this.
Check to see if the user running the service of the domino server has full access rights to the c:\windows\temp folder
If your server is running Windows 2008 and no specific user is added to run the service.
Make sure that both system and Services has full access to that folder.

Can a ClickOnce application return a value to the page that loaded it?

I have an online ClickOnce application that launches from a web page. After the application is closed, I would like the user to return to that page with some results passed from the application. Is this possible?
Right now the only solution I have is for the application to upload the results to my server, and have javascript on the launching webpage to poll the server every 15 seconds as it waits for results.
No. It is not possible to pass information directly back to the client browser from the ClickOnce installed application.
Your intuition is correct that you should have your application upload results to the server (presumably with the help of WCF) for subsequent processing and display via your polling page.
I'll also add, that in terms of your web application linking to data from the ClickOnce application you will need to come up with a common token between the web application and the ClickOnce application. Perhaps via a customised activation URL link that uses a common GUID generated for the client (e.g. http://myserver.com/myapplication.application?id=18c40c3d-183c-4c22-8127-37cac3be6492).

Browser plugin which can register its own protocol

I need to implement a browser plugin which can register its own protocol (like someprotocol://someurl) and be able to handle calls to this protocol (like user clicking on 'someprotocol' link calls function inside my plugin). As far as I understand, Skype does something similar, except I need to handle links within page context and not in a separate app. Any advice on how this can be done? Can this be done without installing my own plugin, with the help of flash/java?
Things are going to be slightly more complicated than you think.
You're going to have to create an entire application, not just a browser plugin (that plugin can be part of your application). The reason I consider it to be a complete application is that you're going to need to modify registry settings on the client machine to register your custom URL handler.
Here's an MSDN article describing exactly what you have to do to register the custom URL handler on a Windows client:
Registering an Application to a URL Protocol

Resources