locked
Plugin Error / Not recognised RRS feed

  • Question

  • Hey Guys,

     I have the below code :

    The AIM is for me to get the DataValue for the field "new_cessionoflifepolicy" from the opportunity Entity and assign it to the "new_Litigation's" "new_lifepolicy" field.

    It complies nicely, but upon registration of the "Assembly / Plugin", the Plugin Registration tool only shows me "(Assembly)GetApplicationAccountID" and NO Plug-in...

     

    Is there something that am missing??

    Please HELP! :-(

     

    using System;

    using Microsoft.Crm.Sdk;

    using Microsoft.Crm.SdkTypeProxy;

    using System.Collections.Generic;

    using System.Text;

    using GetApplicationAccountID.CRM;

     

    namespace GetApplicationAccountID

    {

     class GetApplicationAccID : IPlugin

    {

    public void Execute(IPluginExecutionContext context)

    {

    if(context.InputParameters.Properties.Contains("Target") && context.InputParameters.Properties["Target"] is GetApplicationAccountID.CRM.DynamicEntity)

    {

    GetApplicationAccountID.CRM.DynamicEntity target = (GetApplicationAccountID.CRM.DynamicEntity)context.InputParameters.Properties["Target"] ;

    if(target.Name != GetApplicationAccountID.CRM.EntityName.opportunity.ToString()) { return; }

    }

    else

    {

    return;

    }

    try

    {

    GetApplicationAccountID.CRM.opportunity App = new GetApplicationAccountID.CRM.opportunity();

    Guid appAccGuid = App.customerid.Value;

    GetApplicationAccountID.CRM.new_litigation Lit = new GetApplicationAccountID.CRM.new_Litigation();

    Guid litAccGuid = Lit.new_accountid.Value;

    if(appAccGuid == litAccGuid)

    {

    Lit.new_lifepolicy = new GetApplicationAccountID.CRMPicklist();

    Lit.new_lifepolicy.Value = app.new_cessionoflifepolicy.Value;

    }

    }

    caatch(System.Web.Services.Protocols.SoapException ex)

    {

    throw new InvalidPluginExecutionException("An error occurred in the Plug-in.", ex);

    }

    }

    }

    }

     

    Regards

    Neefy

    Friday, May 7, 2010 1:31 PM

Answers

All replies