Plugin on Quote Win InputParameters.Contains("Target") issue RRS feed

  • Question

  • I have a plugin that runs on Quote Win. However there seems to be some issue with getting the inputparaments. I'm assuming because the quote is active and read only at this point that I must use the pre-entity image values? However I've tried a couple different code snippets and both thrown and exception.

    if (context.InputParameters.Contains("Target") && context.InputParameters["Target"] is Entity)
    if (context.PreEntityImages.Contains("Target") && context.PreEntityImages["Target"] is Entity)

    Neither bit works. I have an else statement that throws an exception. Any ideas what I'm doing wrong? This works fine if the plugin runs on Quote Update. Just not Quote Win...

    Thanks for any help.

    Friday, November 22, 2013 5:40 PM

All replies

  • Please go through this post :


    Hope this helps. If you get answer of your question, please mark the response as an answer and vote as helpful !
    Vikram !

    Saturday, November 23, 2013 1:20 AM
  • Hi,

    In the first example, you are expecting an entity for target, but for the quote win event you will get an entityreference instead:

    context.InputParameters["Target"] is EntityReference

    On the second one, you need to specify the name of the entity image instead of "Target". For example:


    Hope this helps!



    Monday, November 25, 2013 10:57 AM
  • I tried both of these solutions and I still still throw my invalid argument error relating to the context.inputparameters. I'm just going to wait to hear back from our Microsoft Partners on it. I was just being impatient. Thanks for the help though guys.
    Monday, November 25, 2013 4:24 PM