Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Unable to integrate NAV 2009 with 3rd party portal via API integration

Posted on by 20

We are trying to integrate NAV 2009 with Indian government GST portal for GST E-Invoice and E-way bill.  Technical specification of the system, server 2008 r2 sp1. Unable to access DLL file in automation assembly.  IT says it doesn't support Dot Net data type in NAV 2009 SP1.

Kindly help. 

  • Rama_1 Profile Picture
    Rama_1 20 on at
    RE: Unable to integrate NAV 2009 with 3rd party portal via API integration

    Pls help us for the  integrate NAV 2009 with 3rd party portal via API integration

  • Rama_1 Profile Picture
    Rama_1 20 on at
    RE: Unable to integrate NAV 2009 with 3rd party portal via API integration

     public async Task<string> PostJsonData(JObject jsonObject, string ASP_URL, string CID, string CSR)

           {

               ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

               ServicePointManager.Expect100Continue = true;

               ServicePointManager.DefaultConnectionLimit = 9999;

               var RequestJsonData = new StringContent(jsonObject.ToString(), Encoding.UTF8, "application/json");

               try

               {

                   using (HttpClient client = new HttpClient())

                   {

                       client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

                       client.DefaultRequestHeaders.Add("gspappid", CID);

                       client.DefaultRequestHeaders.Add("gspappsecret", CSR);

                       string json = JsonConvert.SerializeObject(jsonObject);

                       StringContent JsonData = new StringContent(json, Encoding.UTF8, "application/json");

                       using (HttpResponseMessage response = client.PostAsync(Uri.EscapeUriString(ASP_URL.Trim().ToString()), JsonData).Result)

                       {

                           using (HttpContent Res = response.Content)

                           {

                               string resData = await Res.ReadAsStringAsync();

                               return resData.ToString();

                           }

                       }

                   }

               }

               catch (Exception Ex)

               {

                   return Ex. Message;

               }

           }

  • Rama_1 Profile Picture
    Rama_1 20 on at
    RE: Unable to integrate NAV 2009 with 3rd party portal via API integration

    Hi Bilal,

    Thanks for the quick response.

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: Unable to integrate NAV 2009 with 3rd party portal via API integration

    Please share the code you have tried, you could build a dll in Visual Studio and then that could do make the calls to the API or integration software.

  • Suggested answer
    Bilal Haider Profile Picture
    Bilal Haider 45 on at
    RE: Unable to integrate NAV 2009 with 3rd party portal via API integration

    Hi,

    On NAV 2009 SP1 yes it does not work straight forward. You can give a try to go through this: navnetwork.wordpress.com/.../

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans