Need Sample Code for Accessing Axapta using C#

Manish.Sharma
Member Posts: 4
Hi Pals,
I want to access the Axapta application using C# code. If someone has some of the sample solutions, please help me.
These samples will help me a lot as I am a complete Amateur in field of Programming
.
Thanks in Advance...
I want to access the Axapta application using C# code. If someone has some of the sample solutions, please help me.
These samples will help me a lot as I am a complete Amateur in field of Programming

Thanks in Advance...
With Regards,
Manish
Manish
0
Comments
-
You should use Axapta Business Connector. Look at google with Axapta Business Connector and c#.
Here you have a sample but with visual basic:
http://msdn2.microsoft.com/en-us/library/aa478711.aspx0 -
Thanks a lot buddy... It is definitely gonna help me... All the very best...With Regards,
Manish0 -
Hi,
See if this helps u: Its in C# and is used to log in AX
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.Dynamics.BusinessConnectorNet;
namespace SMSBCTest
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
String company;
String Language;
String objectServer;
String configuration;
Axapta axapta1 = new Axapta();
System.Net.NetworkCredential Proxy;
String username;
String domain;
company = null;
Language = "en-us";
objectServer = "ARIJIT200792";
configuration = "";
username = "aribas951";
domain = "IN.nam.ad.pwcinternal.com";
Proxy = new System.Net.NetworkCredential("aribas951", "Password", domain);
try
{
//axapta1.Logon(null, null, null, null);
axapta1.LogonAs(username, domain, Proxy,null, null, null, null);
MessageBox.Show("Success");
}
catch (Exception e1)
{
MessageBox.Show(e1.Message);
}
}
}
}
Also see this link
http://daxguy.blogspot.com/2007/05/dax- ... ector.html0 -
Thank You Arjit...With Regards,
Manish0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions