Expand my Community achievements bar.

Announcing the launch of new sub-community for Campaign Web UI to cater specifically to the needs of Campaign Web UI users!

CRM Connector/Microsoft CRM activity with Dynamics 365 of Adobe Campaign Classic

Avatar

Employee

Hello Everyone,

I am trying to do the integration between ACC and Dynamics 365 by using help documentation. Integration has been setup successfully, I can see the remote CRM tables, as well as mscrm:mscrmSchemadynamicsCRM schema in Data schemas section.dynamics365.png\\

however when I try to create a simple import workflow (to fetch the data from lead table of CRM), it is not working, throwing error :

using CRM Connector:

SCR-160012 JavaScript: error while evaluating script 'crmConnectorDataMgt_call'.

Unable to create a remote dummy object.

INT-150012 The HTTP query returned a 'Internal Server Error' type error (500)

Synchronize CRM Connector(Import from CRM)

using Microsoft CRM activity:

mscrmWorkflow    SCR-160012 JavaScript: error while evaluating script 'mscrmWorkflow_call'.

mscrmWorkflow    JST-310000 Error while compiling script '/crm/mscrmConnector.js' line 986: vIds is undefined.

mscrmWorkflow    processed: 0, inserted: 0, updated: 0, rejected: 0, deleted: 0, ignored: 0.

mscrmWorkflow    Cannot obtain time from the remote server, cause: 'TypeError: this.m_schema is undefined'.

mscrmWorkflow    Call Microsoft CRM - lead

What could the reason for this ? Can anyone please suggest me on this. Any help is appreciated.

Regards,

Ashish

5 Replies

Avatar

Community Advisor

Sounds like a permission/privilege issue on Dynamics

Avatar

Employee

Thanks David for your response. Can you please let me know what permission it should in the Dynamics? As per Dynamics 365 consultant "account which is being used for Adobe Campaign Lead Import has organizational level rights for all data import functions and the lead entity". Thanks Again.

Avatar

Level 1

Hi Ashish,

Did you get to the bottom of this issue?  We are facing the same problem.

Thanks, Chris

Avatar

Employee

Hi Chris,

Issue was with the correct field mapping of Dynamics. You need to define which is a primary/unique key from dynamics. Please let me know, if you need any more information. Thanks.

regards,

Ashish

Avatar

Level 1

Thanks for replying.

We discovered that the Adobe CRM connector for D365 employs a method of determining the remote time during each API call using a 3 step method:-

1. Create a dummy contact record

2. Check the modified time of the dummy contact record

3. Delete the dummy contact record

Unfortunately this behaviour interfered with a custom-developed D365 plugin which triggers some business rules around newly created Contacts and hence interrupted the Adobe Campaign CRM connector.  When this particular D365 plugin was turned on, the CRM Connector from Adobe Campaign to D365 failed consistently.  When the plugin was turned off in D365 the CRM Connector worked as expected.  The fact that the CRM connector creates a dummy contact in D365 (regardless of the fact that it is merely reading data) every time the API is called and this in-turn causes the CRM Connector failure.

We were able to determine this behaviour by looking at the code comments.  See Adobe developer code comments in red from datakit/crm/eng/js/connectorDataMgt.js

MscrmWorkflowDataMgtWeb.prototype.getServerTime = function(holder)

{

  //Create an object, get its date and delete it

  if( this.m_iDeltaTime !== undefined && !holder )

    return this.datetimeLocalToRemote(getCurrentDate());

  this.m_iDeltaTime = null;

  var localDate = getCurrentDate();

  // There is no dedicated method to query the MsCrm remote time, it's a 3 steps hack:

  // 1) Create a remote object

  // 2)query for the remote object and get its creation time

  // 3)delete the remote object

  const strEntityName = "contacts";

  var request = this.makeRequest(this.m_strServiceUrl + '/contacts');

  request.method = 'POST';

  request.body = '{  "firstname": "Delete this entry"  }'

  try

  {

    request.execute();

    if (request.response.code >= 400)

    {

      var jsonRes = JSON.parse(request.response.body)

      throw new Exception(jsonRes["error"]["message"].toString());

    }

    var strEntityUrl = request.response.header['OData-EntityId'];

  }

  catch( e )

  {

    throw new Exception(WorkflowDataMgt.StringGroup.mscrmCannotInsertDummy(e), true);

  }

Hope this might help someone else in future.

Thanks