locked
MS CRM 3.0 - Bulk Import and Callouts RRS feed

  • Question

  • Hello,
    I am currently working on callouts to detect duplicates when creating records in MS CRM 3.0. Everything works fine when creating records in a standard way within MS CRM. Everytime a records is created the callout is triggered (both Post- and PreCreate events are working fine). But if I use the Bulk Import functionality of the Outlook client these events are not triggered. New records are created, but the Create callout events are not triggered. There are no error messages in the Event Log or any other error message indicating that something goes wrong during the Bulk Import.
     
    So my questions is, does a Bulk Import not trigger callout events? Is there anything I need to configure so that callout events are triggered. Searching on that problem on the Web didn't return any results.
     
    Any input is much appreciated.
     
    Many thanks.
    Monday, September 29, 2008 3:03 PM

Answers

  • Unfortunately, the callouts aren't triggered by a bulk import. The underlying reason is that bulk imports are done by the CRM Workflow Service, and actions performed by workflow don't triger callouts.

     

    The way I've got round this is to create a workflow assembly that is called by a workflow on the Create event. This assembly could either duplicate the callout code, or could induce an update (via the CRM web service) on the record, and the callout could be configured to fire on updates as well.

     

    Or if you could upgrade to CRM 4, then you get duplicate detection capabilities, and the problem with workflows not firing callouts is also fixed

     

    Monday, September 29, 2008 3:26 PM
    Moderator

All replies

  • Unfortunately, the callouts aren't triggered by a bulk import. The underlying reason is that bulk imports are done by the CRM Workflow Service, and actions performed by workflow don't triger callouts.

     

    The way I've got round this is to create a workflow assembly that is called by a workflow on the Create event. This assembly could either duplicate the callout code, or could induce an update (via the CRM web service) on the record, and the callout could be configured to fire on updates as well.

     

    Or if you could upgrade to CRM 4, then you get duplicate detection capabilities, and the problem with workflows not firing callouts is also fixed

     

    Monday, September 29, 2008 3:26 PM
    Moderator
  • Hi,

    thanks a lot for your quick response. I will try the workflow assembly option to induce an update.

     

    Monday, September 29, 2008 3:34 PM
  •  

    Hi FT,

     

    Callouts do work from bulk import in 3.0, not sure whether you're specifically referring to the Outlook client or bulk import in general.

     

    http://msdn.microsoft.com/en-us/library/aa681368.aspx

     

    You probably have to restart the crmworkflow service for the workflow part of your solution to read your latest version of the callout.config.xml.

     

    When your record is created via I.E it uses a different process to the one used by workflows. Thus if you were to try debug the callout, it would only hit your breakpoint if you attach the process to the w3wp process. If however you attach to the CrmWorkflowServer.exe process, you are able to step into the debugger.

     

    The easiest way to test this (if you're still having problems) is to write a short message to a .txt file in the precreate/postcreate handler:

     

    WriteToFile("precreate", "precreate.txt");

     

     

      private void WriteToFile(string message, string filename)
      {

       if (bDebug)
       {
        if (filename == string.Empty)
         filename = "callout_test_output.txt";

        using (StreamWriter sw = File.AppendText(@"C:\Debug\" + filename))
        {
         sw.WriteLine(message);
        }
       }
      }

     

     

    Cheers,

     

    Karlo

    Monday, September 29, 2008 7:13 PM
  • David,

     

    Can you tell me how you wrote the workfolw assembly (the actual code)? I am a beginner user in CRM 3.0 and have created several workflows. We won't be upgrading to 4.0 for another two quarters.

     

    Wednesday, November 12, 2008 8:13 PM
  • Hello,
    I am currently working on callouts to detect duplicates when creating records in MS CRM 3.0. Everything works fine when creating records in a standard way within MS CRM. Everytime a records is created the callout is triggered (both Post- and PreCreate events are working fine). But if I use the Bulk Import functionality of the Outlook client these events are not triggered. New records are created, but the Create callout events are not triggered. There are no error messages in the Event Log or any other error message indicating that something goes wrong during the Bulk Import.
     
    So my questions is, does a Bulk Import not trigger callout events? Is there anything I need to configure so that callout events are triggered. Searching on that problem on the Web didn't return any results.
     
    Any input is much appreciated.
     
    Many thanks.

    Hi,

    I am facing the same problem. Can you please tell me how did yo solve this?

    I want to call a CRM Workflow from the Bulk import functionality. Is it possible to call a work flow? I am very much new in CRM 3.0... So please help me out to sort this thing out.

    Thursday, April 8, 2010 10:41 AM