loading...

. . . . . .

Let’s make something together

KAISPE has been providing solutions and services to customers using Microsoft Dynamics, Azure, Power platform, Oracle NetSuite, mobile and web app development.

    • US OFFICE
    • +1 315 791 4472
    • KAISPE LLC
      590 Madison Avenue 21st Floor Manhattan, NY 10022 USA.

 

  • PAKISTAN OFFICE
  • +92 213 432 6085
  • M/S KAISPE
    Suite#213 Sumya Business Avenue MACHS Karachi, Pakistan.

Microsoft PowerApps – Writing custom connector for Dynamics GP

  • January 13, 2021
  • 952 Views

Today, We will show you how to create OData web services for Microsoft Dynamics GP to consume with Microsoft Power Platform Custom Connector.

Open Visual Studio.

Create New Project.

Select Web API and Create.

Add ADO .NET Entity Data Model.

Specify the Name of the Item.

Select EF Designer

Create New Connection with your SQL Server where your Dynamics GP Database exist.

Enter Server Name.

Select SQL Server Authentication.

Enter Credentials for your SQL Server.

Select your database name.

Afterwards, test your connection.

Click OK.

Set settings for now like below and Click Next.

Choose Entity Framework 5.0 and Click on Next.

Choose tables and click on finish.

Now, Build Your Solution.

Add Controller.

Select Web API OData v3 Controller with actions, using Entity Framework.

 

Now copy these lines and paste them into WebApiConfig.

using System.Web.Http.OData.Builder;

using System.Web.Http.OData.Extensions;

using odatacustomconnector.Models;

And on the method, paste these lines of code. We are using only one entity, you can add more according to your need.

ODataConventionModelBuilder builder = new ODataConventionModelBuilder();

builder.EntitySet<PM00200>(“PM00200”);

config.Routes.MapODataServiceRoute(“odata”, “odata”, builder.GetEdmModel());

Your WebApiConfig file code looks like below

Now, Play the app and check the odata url.

So, you can publish your app and consume OData web services to create a Custom Connector and start to play with the PowerApps app.