Hi all,
I found several examples for accessing data from ax by using C# but i need to know how could i access the same through vb.net.
can any1 share me the sample code like this
https://docs.microsoft.com/en-us/previous-versions/dynamicsax-2009/developer/aa868997%28v%3dax.50%29
Thanks

Jefferson S. MottaRank #207 · 11.7K reputationPosted Sep 28, 2018, 9:47 PM EDT
pranita shaha13 reputationPosted Nov 14, 2018, 8:37 PM EST
hello,
if I understand, you want to get a VB.Net code sample using the connector or maybe converting the existing C# code samples to VB.Net, here is, for example, a converted to a VB.Net version of the C# code in the link:
Imports Microsoft.Dynamics.BusinessConnectorNet Dim ax As Axapta Dim axRecord As AxaptaRecord Dim tableName As String = "AddressState" Try ' Login to Microsoft Dynamics AX. ax = New Axapta ax.Logon(Nothing, Nothing, Nothing, Nothing) ' Create a new AddressState table record. axRecord = ax.CreateAxaptaRecord(tableName) ' Provide values for each of the AddressState record fields. axRecord.set_Field("NAME", "MyState") axRecord.set_Field("STATEID", "MyState") axRecord.set_Field("COUNTRYREGIONID", "US") axRecord.set_Field("INTRASTATCODE", "") ' Commit the record to the database. axRecord.Insert Catch e As Exception Console.WriteLine("Error encountered: {0}", e.Message) ' Take other error action as needed. End Try