Async Plugin to detect duplicate on appointment create is not working : CRM 2011 RRS feed

  • Question

  • Hi All,

    I have created Post Async plugin to mark duplicate on appointment create but it is giving inconsistent behaviour (sometime working and sometime not) , my code is like this 

    We have some 7 fields on appointment form and on appointment create this plugin checks if any record with these values are already exist in the system if yes then update the current record.

    Used LINQ query to check 7 parameters values(7 fields) in appointmentset and if its result count is greater than 1 than Mark current record as duplicate.

    Do I need to use query paging to check duplicate in all appointments ??

    If I change Async to Sync pre-operation and no update service call(as we can mark or update field bcoz its not yet updated in the DB) to mark duplicate then it works fine but we can not use Sync ?? 

    In import appointment it is marking duplicate to all appointments even we dont have any original record in the system?? 

    Please help ,

    Note : We can not use OOB duplicate detection due to some existing system integration so we have to write plugin and it should be Async only.

    Thank you ALL :)
    • Edited by Absha Saturday, July 23, 2016 7:22 AM
    Saturday, July 23, 2016 3:25 AM