locked
missing collection on form submit? RRS feed

  • Question


  • Hello - Under what scenario might you expect to encounter a missing collection on form submit?  It was working before but now it's not and the collection is not getting passed from the form to the plugin?
     
    Simple attributes are getting passed, 1-to-many attributes are getting passed, however, many-to-many relationship attributes are not getting passed from the form into the plugin? Any idea what might be causing this behavior or how to debug?
    Tuesday, August 6, 2013 4:00 AM

All replies

  • N:N relationship information is not included in Create/Update context. Only fields on the form can be passed into the Create/Update messages. If you need to get records from an association you should get the context.PrimaryEntityId and then do a retrieve multiple inside your plugin. Or if you want to register your plugin when N:N records are associated with a record then you can register on the Associate and Disassociate messages as well.

    P.S. I noticed you've asked a lot of questions lately, but have not been going back and closing them as answered. Please find the time to go through and close all of you questions as answered once you've resolved your problem. That way others can easily find the answer when searching for similar problems, and also it's a way of thanking us for taking our time to help you.

    Regards

    Paul


    If my response helped you find your answer please show your thanks by taking the time to "Mark As Answer" and "Vote As Helpful".

    Twitter LinkedIn Facebook Blog Magnetism

    Tuesday, August 6, 2013 7:50 AM
  • In Create/Update we only get the fields those were populated/updated on the current form. We don’t get N:N relationship entity field. You have to perform retrievemultiple for this. You can go with Fetch or Query expression.

    The entity contained in the InputParameters["Target"] only includes the changed fields that were submitted in the update not all fields. In case of Create InputParameters["Target"] always contains all fields of current form during a Create.

    Thanks!

    If this post answers your question, please click "Mark As Answer" on the post and "Vote as Helpful".

    Tuesday, August 6, 2013 9:09 AM