using System;Edit: To add error message and screenshot of stackoverflow.
using System.Text;
using System.Diagnostics;
using System.Diagnostics.Process;
local ProcessStartInfo psi;
local text url;
local Process OpenUrl;
OpenUrl=new Process();
psi=new ProcessStartInfo();
url= "www.google.com";
psi.UseShellExecute = true;
psi.FileName= url;
OpenUrl.Start(psi);
#MSDynGP,#dynamics,#erp,#businesscentral,#microsoftdynamics,#microsoftdynamicsax#PowerApps
Pages
- Home
- Hire the best Microsoft Dynamics GP Freelancer
- Get Quote VBA to Sanscript(Dexterity)/VSTools
- What People Asked
- Testimonials
- Example: How to Open URL from .Net from inside of Dexterity Code.
- Dynamics GP C# Integration: RMCustomerAddress
- How to verify inactive employee on Time Card Entry Window
- Cash Receipt Window: Stop user to delete receipts
- Sales Transfer Document , Include Total and Deposits
- Looking for GP Tables?
- Deployment Steps For Travelers report
- How to create Test GP folder for tetsing dexterity changes.
Total Pageviews
Example: How to Open URL from .Net from inside of Dexterity Code.
After Adding Library references.
Use below code.
Subscribe to:
Post Comments (Atom)
Some of my Dynamics GP freelance work
- Home
- eConnect: Payables Transaction Entry Distribution
- eConnect: Vendor EFT Bank Maintenance
- Another eConnect task for Payable Transaction Tax Assignment
- Manufacturing Traveler Report with Components - Component Sort Order
- Auto Calculate Back Order Quantities
- Adding 2 new fields to FA PO Additional Information Window
- Cashbook Bank Management Cash Receipt : Post transaction before printing.
- What if I only have chunk and not the source code! can you upgrade for newer version?
- Sales Quote Form Report: group by Item Class.
- Payables Historical Aged Trial Balance - SQL Script
- Modifying Smartlist Customer and Vendor Lookup
- Dynamics GP C# Integration: RMCustomerAddress
.
My Learning Resources
!doctype>
FYI - You don't need to make a new ProcessStartInfo, you can use the one that exists in the Process object. Here's the code I've used for years:
ReplyDeleteProcess process = new Process();
process.StartInfo.Verb = "Open";
process.StartInfo.FileName = url;
process.StartInfo.CreateNoWindow = true;
process.Start();
Hi John, Thanks for sharing your thoughts. I was actually not creating new ProcessStartInfo, but getting below error
ReplyDeleteUnhandled object exception:
Null Reference Exception
EXCEPTION_CLASS_OBJECT_EXCEPTION
ExceptionSubClass:0
On googling it , someone on stackoverflow suggested below
Since you specify that the exception is thrown on the proc.Start() , I would suggest you to declare a ProcessStartInfo, and use it with Process.Start()
For example:
Dim l As New ProcessStartInfo
l.FileName = exepath
' ...
Process.Start(l)
I will try your suggested code. I am not very good with .Net :)