locked
I want to create a single record after an import to a specific entity. RRS feed

  • Question

  • How can a plug-in be registered on an import?
    There are messages 'Import' and 'Import All'. How are they used?

    I want to create a single record after an import to a specific entity.
    I tried to use 'Import', but I do not know what context.InputParameters["Target"] is. The plug-in did not fire when I imported a CSV.

    Thanks in advance.

    Monday, June 23, 2014 4:37 PM

All replies

  • The Import and ImportAll messages are used to import customisations, rather than data.

    There are no messages specific to importing data on which you can fire a plugin. Instead, if you want to fire a plugin for every record imported, I'd use the Create message for that entity. If you want to distinguish between records that is created via an import, and those created by other means, then I'd include a dummy field in the import. Alternatively, if you only want the pluign to fire once, when the import finishes, then you try using the Update message of the AsyncOperation entity, and check the OperationType


    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Tuesday, June 24, 2014 6:28 AM
    Moderator
  • Thanks alot Mayank.
    Tuesday, June 24, 2014 3:30 PM