Hi All,
Could you give solution for below one.
How to call dexterity function from c# using eConnect?
Thanks and Regards
Vamsi
*This post is locked for comments
Hi ManiKandan,
Can you guide me on below one.
How to use Vstools in c# and give me sample code for calling dexterity procedure from c#?
Thanks
Vamsi
Vstools comes with GP setup folder. There itself you can find sample too.
Hi Manikandan,
I am new to the Dynamics Gp, Could you tell me, where can i download VSTools and also provide me sample code for calling dexterity procedure from c#.
Thanks
Vamsi
You can use the VSTools to call dex code in c#.
Hi Praveen,
i need to call dexterity function or procedure or batch using c# code?
Thanks
Vamsi
Hi,
I believe you want to integrate an application with GP using eConnect and need to pass the Data to eConnect right ?!
You can explore below link to know more about eConnect and its Schemas,
msdn.microsoft.com/.../aa155259.aspx
If you are in different requirement, please provide more clarity.
Further more i suggest you can develop SQL Stored Procedure and use inside C# if there is no Schema for any particular feature, but need to be much careful in updating all relevant tables.
Below sample code available on Microsoft Portal,
Sample Code for eConnect on C#
using System;
using System.IO;
using System.Data;
using System.Text;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Serialization;
using Microsoft.Dynamics.GP.eConnect;
using Microsoft.Dynamics.GP.eConnect.Serialization;
namespace eConnectSample
{
public partial class InventoryItemCreate : Form
{
public InventoryItemCreate()
{
InitializeComponent();
}
private static void sendtogp()
{
using (eConnectMethods eConCall = new eConnectMethods())
{
try
{
SerializeObject("c:\\test\\eConnect.xml");
XmlDocument xmldoc = new XmlDocument();
xmldoc.Load("c:\\test\\eConnect.xml");
string send2gp = xmldoc.OuterXml;
string sConnectionString = "data source=sqlserver;initial catalog=TWO;integrated security=SSPI;persist security info=False;packet size=4096";
string ivitem = eConCall.CreateTransactionEntity(sConnectionString, send2gp);
}
catch (eConnectException exp)
{
MessageBox.Show(exp.ToString());
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
finally
{
eConCall.Dispose();
MessageBox.Show("done");
}
}
}
private static void SerializeObject(string filename)
{
try
{
taUpdateCreateItemRcd itm = new taUpdateCreateItemRcd();
itm.ITEMNMBR = "ITEMNAME";
itm.ITEMDESC = "Item description";
itm.ITMSHNAM = "Short Description";
itm.ITMGEDSC = "Generic description";
itm.ITMCLSCD = "FG-ACT";
itm.ITEMTYPE = 1;
itm.UOMSCHDL = "EACH";
itm.UpdateIfExists = 1;
IVItemMasterType iv = new IVItemMasterType();
iv.taUpdateCreateItemRcd = itm;
IVItemMasterType[] myIV = { iv };
eConnectType eConnect = new eConnectType();
eConnect.IVItemMasterType = myIV;
FileStream fs = new FileStream(filename, FileMode.Create);
XmlTextWriter writer = new XmlTextWriter(fs, new UTF8Encoding());
XmlSerializer serializer = new XmlSerializer(eConnect.GetType());
serializer.Serialize(writer, eConnect);
writer.Close();
}
catch (eConnectException ex)
{
MessageBox.Show(ex.ToString());
}
}
private void Send2GP_Click(object sender, EventArgs e)
{
sendtogp();
}
}
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156