Hi,
Does anyone succesfully connected NAV 2017 CU 2 with CRM On-Premise (with latest updates) ?
It worked on NAV 2017 before installing cum. updates. However, since the CU 1 and 2 installed (these cum. updates contain changes in CRM authentication), i cannot make it work. I have changed connection string (as the standard one only works with CRM online) to the string that correctly works from .NET. However when i connect to CRM and run any table, or try to execute any command on linked CRM table, i am getting a strange error:
Microsoft Dynamics NAV
An error occurred when communicating with Microsoft Dynamics CRM.
Detailed description: Object reference not set to an instance of an object.
OK
Here is the sample code that I use to try connection:
REGISTERTABLECONNECTION(TABLECONNECTIONTYPE::CRM,ConnectionName,'Url=http://lab-crm2016/EGA-DEV;Domain=labnet;UserName=appserver@labnet.loc;Password=xxx;AuthType=IFD');
SETDEFAULTTABLECONNECTION(TABLECONNECTIONTYPE::CRM,ConnectionName);
CRMAccount.FINDFIRST;
It looks like the tableconnection is established (no error), however running the CRMAccount.FINDFIRST; gives me that strange error. The same error i get if I run any CRM table from object designer, or if i click "Try connection" from CRM Connection Setup. I have also tried various other connection strings, but without success.
Pls. help if you have any idea.
Thanks, Michal
Answers
You may also try running CRM at port 80 and and type your local ip instead of domain name.
Zaid Tariq
Dynamics NAV/365 BC Developer at Dynamics 360
please like / agree / verify my answer, if was helpful.
Thanks for reply - SSL is not required, before cumulative update NAV 2017 connected to that CRM site without problems. Seems like something happened with cum. update 1 or 2.
Best regards,
Michal
Carsten
==> How To Ask Questions The Smart Way
This post is my own opinion and does not necessarily reflect the opinion or view of my employer.
it seems to be a problem with a modification in your application.
I hardly believe that MS releases multiple updates in which the CRM-connection doesn't work.
The error you get is related to a .Net-variable.
Check this link to understand the reason behind the error:
http://stackoverflow.com/questions/4660142/what-is-a-nullreferenceexception-and-how-do-i-fix-it
Cheers,
Hannes