Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

Cannot Throw Plugin Exception when Create OpportunityProduct after update rollup 10

$
0
0
Hi All:

I use CRM 2011, after update rollup 10.
I cannot throw any exception message in plug-in when create opportunityProduct,
the system exception message is not my expect..

Please give me a hand.

ps1: registration message:Create, Eventing execution: pre-operation or post-operation.
ps2: there is the same problem when create QuoteDetail.

---- code ----
namespace TestPlugin
{
    public class postCreateOpportunityProduct:IPlugin
    {
        public void Execute(IPluginExecutionContext context)
        {
            throw new InvalidPluginExecutionException("Test_123");
        }
    }
}


---- system message ----
Event code: 3005 
Event message: An unhandled exception has occurred. 
Event time: 2012/9/19 上午 09:37:14 
Event time (UTC): 2012/9/19 上午 01:37:14 
Event ID: daaad4c7c7fc44ab9db2a9e139a8ecbd 
Event sequence: 1501 
Event occurrence: 5 
Event detail code: 0 

Application information: 
    Application domain: /LM/W3SVC/2/ROOT-2-129924429761542445 
    Trust level: Full 
    Application Virtual Path: / 
    Application Path: C:\Program Files\Microsoft Dynamics CRM\CRMWeb\ 
    Machine name: KST 

Process information: 
    Process ID: 3040 
    Process name: w3wp.exe 
    Account name: NT AUTHORITY\NETWORK SERVICE 

Exception information: 
    Exception type: ArgumentException 
    Exception message: Invalid state code
   at Microsoft.Crm.Application.Platform.OpportunityProduct.SetDisabled()
   at Microsoft.Crm.Application.Forms.AppForm.RestoreEntity(EntityProxy entity, String changedFormData, String savedData)
   at Microsoft.Crm.Application.Forms.AppForm.SaveEntity(EntityProxy entity, FormEventId eventType, String redirectPath, Boolean performDuplicateCheck)
   at Microsoft.Crm.Application.Forms.AppForm.Save(Boolean& gridRefreshCallbackAdded)
   at Microsoft.Crm.Application.Forms.AppForm.FormSaveEvent()
   at Microsoft.Crm.Application.Forms.AppForm.RaiseDataEvent(FormEventId eventId)
   at Microsoft.Crm.Application.Forms.EndUserForm.Initialize(Entity entity)
   at Microsoft.Crm.Application.Forms.CustomizableForm.Execute(Entity entity, FormDescriptor fd)
   at Microsoft.Crm.Application.Components.PageHandlers.OpportunityProductRecordPageHandler.ConfigureFormHandler()
   at Microsoft.Crm.Application.Components.Utility.GenericEventProcessor.RaiseEvent(String eventName)
   at Microsoft.Crm.Application.Controls.PageManager.OnPreRender(EventArgs e)
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)




Request information: 
    Request URL: http://10.10.1.1:80/[OrgName]/userdefined/edit.aspx?_CreateFromId={BC98D217-4CFE-E111-9E71-005056AF0035}&_CreateFromType=1084&etc=1085&pagemode=iframe&preloadcache=1348018623167 
    Request path: /[OrgName]/userdefined/edit.aspx 
    User host address: 10.10.1.1 
    User: [AD]\crmadmin
    Is authenticated: True 
    Authentication Type: Negotiate 
    Thread account name: NT AUTHORITY\NETWORK SERVICE 

Thread information: 
    Thread ID: 41 
    Thread account name: NT AUTHORITY\NETWORK SERVICE 
    Is impersonating: False 
    Stack trace:    at Microsoft.Crm.Application.Platform.OpportunityProduct.SetDisabled()
at Microsoft.Crm.Application.Forms.AppForm.RestoreEntity(EntityProxy entity, String changedFormData, String savedData)
at Microsoft.Crm.Application.Forms.AppForm.SaveEntity(EntityProxy entity, FormEventId eventType, String redirectPath, Boolean performDuplicateCheck)
at Microsoft.Crm.Application.Forms.AppForm.Save(Boolean& gridRefreshCallbackAdded)
at Microsoft.Crm.Application.Forms.AppForm.FormSaveEvent()
at Microsoft.Crm.Application.Forms.AppForm.RaiseDataEvent(FormEventId eventId)
at Microsoft.Crm.Application.Forms.EndUserForm.Initialize(Entity entity)
at Microsoft.Crm.Application.Forms.CustomizableForm.Execute(Entity entity, FormDescriptor fd)
at Microsoft.Crm.Application.Components.PageHandlers.QuoteDetailRecordPageHandler.ConfigureFormHandler()
at Microsoft.Crm.Application.Components.Utility.GenericEventProcessor.RaiseEvent(String eventName)
at Microsoft.Crm.Application.Controls.PageManager.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Viewing all articles
Browse latest Browse all 8223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>