Add function button
Conte Ercole
Hello all,some one can tell me how to develop a function button in a purchase order.
LANGUAGE : VBCODE
ACTION : shell ("C:file.exe docnum;series")
where docnum is the document number of the actual pourchase order
and series is the series of the actual pourchase order.
thak you all
Michael Egloff
Hello all,here is a solution for a call of an external programm in C# Code:
try
{
string docNum = SwissAddonFramework.UI.Components.TextEdit.GetFromUID(pVal.Form, "8").Value;
string series = SwissAddonFramework.UI.Components.ComboBox.GetFromUID(pVal.Form, "88").Value;
string fileName = @"C:programma.exe";
string arguments = docNum + ";" + series;
System.Diagnostics.Process.Start(fileName, arguments);
}
catch(System.Exception exe)
{
MessageBox.Show("Error in FunctionButton: " + exe.Message, "OK");
}
Add this code in the module Function Button and you can start the external programm "programma.exe" with docnum and series as arguments per click on the function button.
0
Please sign in to leave a comment.
Comments
0 comments