Showing results for 
Search instead for 
Did you mean: 

Integration with Microsoft Dynamics CRM

Former Member
0 Kudos

Has anyone here integrated Microsoft Dynamics CRM with PowerBuilder?

Did you use…

- OData?

- An integration tool/driver?

- Scripted access utilizing PowerBuilder .NET?

Thank you.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi, we are using PB Classic against Microsoft Dynamics NAVISION, not the CRM, please find bellow our tech details. 

1) We use Odata for data update, works fine with the next problems.

a. We have to issued <datastore>.retrieve() before any insert/update operations.  In cases like Purchases invoices where you have to fill a header table and detail table, you must fill data on the header and update, retrieve a detail with a key to let the datastore empty, then fill the detail data and update.  If you skip the retrieve, you will receive a message that you are trying to save on the header.

I do not know if this is normal to Odata or a problem with driver.

     b. You can read Boolean data, but no update it.  Values 1 or 0, True or False are invalid. We have to use different approach for data that I will explain later.

     c. We needed to define a default company for the users accessing ODATA.  We had to define the connection without specifying a  company.

Any other approach end in security issues and no connection.

d. We also use a test PB/Sql server database and we needed a Test company inside NAV.   As per previous point we had to define a different NAV Instance.  It uses the same database, but it is a different instance inside NAV.    Cannot elaborate more on the NAV side, but works and it is easy to do.

2) For situations where we have to save Boolean data, we use SOAP webservices.  Related to point 1d) then we need create a different PBL and dlls with different name for test and production.  All NAV functions are on a PBL, we only needed to create a new PBT just changing this PBL, all others are the same.

WDSL location are different per company we need to access.


                Update of this data is as follows:


                                                                              li_val = lnv_soap_conn.createinstance( lnv_ws_journal_service, "ws_journal_service")

                                                                              if li_val=0 then




3) For tables that we need to read only like Customers, Exchange rates, etc.  we created views in SQL Server direct to NAV Tables.  Then we use the standard connection to uses Grid dws, etc.

If you need to use from SQL inside your script, table names with spaces like .[Name 2] are not allowed by PB.  Then we create a calculated field in the view to solve the problem.

ALTER view [dbo].[v_ge_proveedores_nav]

as select v.*,rtrim(' '+rtrim(v.[Name 2]) as razonsocial ,

       rtrim(v.Address)+' '+rtrim(v.[Address 2])+' ,'+v.City as direccion,

       v.[VAT Registration No_] as identificacion,[Type Person] as type_person,

       [E-mail] as email ,

       [Required to Bill] as tipofactura,

       [Tax Area Code] as tax_area_code

       from [SKN-NAVISION\SKNCCITDEPT].SKN_TEST_001.dbo.[SKNCC Produccion$Vendor] as v

4) To call procedures, NAV developers published functions and we called them from PB.

The next example is to print checks.



                                                               li_val = lnv_soap_conn.createinstance( lnv_navws_funcionesgenerales, "navws_funcionesgenerales")

                                                               if li_val=0 then



                                                                                              if ws_error<>"" then

                                                                                                              messagebox("Error Ck Fac",ws_error)


Hope this can help you



Former Member
0 Kudos

Hello John,

We intend to use Web Services to pull data from CRM and display it in PB Web Service DataWindows.

Thank You,


Former Member
0 Kudos


We are integrating with MS Dynamics GP for many years now using a 3rd party tool called Scribe. Works well for the most part. I know it is not CRM but it is close.