Highlighted

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

Avatar

Avatar

ashishk10

Employee

Avatar

ashishk10

Employee

ashishk10
Employee

09-04-2019

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

Replies

Highlighted

Avatar

Avatar

david_garcia1

MVP

Avatar

david_garcia1

MVP

david_garcia1
MVP

09-04-2019

Sounds like a permission/privilege issue on Dynamics

Highlighted

Avatar

Avatar

ashishk10

Employee

Avatar

ashishk10

Employee

ashishk10
Employee

09-04-2019

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.

Highlighted

Avatar

Avatar

chownc

Avatar

chownc

chownc

09-06-2019

Hi Ashish,

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

Thanks, Chris

Highlighted

Avatar

Avatar

ashishk10

Employee

Avatar

ashishk10

Employee

ashishk10
Employee

11-06-2019

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

Highlighted

Avatar

Avatar

chownc

Avatar

chownc

chownc

11-06-2019

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