locked
If a user updates an Account form, that subsequently updates the Contact Form via javascript REST, would a plugin devised for the Contact still fire on Post-Operation? RRS feed

  • Question

  • I have the Account form automatically create a new record for a custom entity called ValidContact, and I then I created a plugin for ValidContact that should be invoked when a field changes in the ValidContact form. The question is - Does the ValidContact form have to be manually interacted with for the Post-Opperation plugin to fire, or can it still be invoked if javascript action made changes to it from another form?
    Thursday, November 28, 2013 8:08 PM

All replies

  • I Dnt Undertsand u question clearly,but you can invoke javascript Rest on change and update the record,but you cnt invoke plugin on change and update the record, for this you need to go for update message in the plugin and write ur business logic.

    ms crm

    Friday, November 29, 2013 6:18 AM
  • As Reddy says, you can't invoke a plug in attached to the ValidContact entity from the Account entity. However, if the Account entity made a change to the data in the ValidContact entity and then there was a plug in that fired when this entity was changed, then I do believe it would run. As it's a CRM process that's making the change, then the system would recognise that as a change and run any post operations as if it was in CRM - very similar to a workflow. What it wouldn't do is run any JavaScript that was in the ValidContact entity as the forms are not being loaded.

    Friday, November 29, 2013 3:31 PM
  • A plugin will fire if the data is changed; it does not matter how the data is changed (as long as it is in a supported way). The plugin will fire if the data is changed by the entity form, from Javascript using the REST or SOAP endpoints in a different form or a web resource, through a workflow, from a plugin, from a data import, or any other means of updating the data via the CRM web service APIs

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

    Friday, November 29, 2013 6:23 PM
    Moderator