locked
Error in CloseOPDialog when trying to close an opportunity from ACTIONS menu. RRS feed

  • Question

  • Good day everyone

    I have been searching around what the problem could be but i just can't figure it out.

    When i try to close close an opportunity; Open Opportunity>>Actions>>Close Opportunity it just doesn't load the asp and throw me this error in the Trace Log.

     

     

    # CRM Tracing Version 2.0
    # LocalTime: 2010-05-19 16:41:00.5
    # Categories:
    # CallStackOn: No
    # ComputerName: WEBTEST
    # CRMVersion: 4.0.7333.1352
    # DeploymentType: OnPremise
    # ScaleGroup:
    # ServerRole: AppServer, AsyncService, DiscoveryService, WebService, ApiServer, HelpServer, DeploymentService
    [2010-05-19 16:41:00.5] Process: w3wp |Organization:ba8332af-db75-4d24-a7c3-f2bf7e6face1 |Thread: 1 |Category: Application |User: 00000000-0000-0000-0000-000000000000 |Level: Error | ErrorInformation.LogError >MSCRM Error Report:
    --------------------------------------------------------------------------------------------------------
    Error: Exception of type 'System.Web.HttpUnhandledException' was thrown. Error Message: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    Error Details: Exception of type 'System.Web.HttpUnhandledException' was thrown.
    Source File: Not available
    Line Number: Not available
    Request URL: http://MY_URL/ORGNAME/sfa/opps/dlg_closeopp.aspx?pId={2C7F46B9-9A57-DF11-BCB7-000D561F0ADD}&pType=3&estimatedVal=10
    Stack Trace Info: [NullReferenceException: Object reference not set to an instance of an object.]
    at Microsoft.Crm.Dialogs.CloseOppPage.ConfigureForm() at Microsoft.Crm.Application.Controls.AppUIPage.OnPreRender(EventArgs e) at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) [HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown.] at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.<orgname>_sfa_opps_dlg_closeopp_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

     


    It is supposed to show the close opportunity dialog, but don't.

    The opportunity form has been modified with normal Field_Event Javascript code, with N fields added to the form, and no ASPX modifications directly.

    The only thing that should be different between the dialog of a newly installed CRM and mine are the STATUS REASON when state LOST is selected, there are just custom values in the picklist.

    Can anyone give some advice on how to fix this or at least a way to get more information about the error.

    Any help would be greatly appreciated.

    Thanks in Advance!

     

    • Edited by Zenrigar Wednesday, May 19, 2010 10:52 PM formatting
    Wednesday, May 19, 2010 10:49 PM

Answers

  • Hey MayankP thanks again for the time, i did add those values back but that was not the problem.

     

    After tests and some workaround and comparing the cuxtomizations.xml  i didn't see this thread about a person getting the errror when upgrading from crm3 to crm4

    http://social.microsoft.com/Forums/en-US/crm/thread/6e55035e-b16b-4766-ae11-586ef72aed9c

    and it's sad, what the error is.

    In my opportunity form the default field NAME is not being used so is located in a tab that is hidden for users, so when an opportunity is created the field NAME get a NULL value, i don't know why this has an impact on the close opportunity dialog, but replacing all the null values of the NAME field in the opportunity's table fixed the problem.

    Check the link that i posted, there are some others opinions in case somebody run in this error.

    Thanks for the time guys! :D

    • Edited by Zenrigar Thursday, May 20, 2010 9:23 PM fixed link
    • Marked as answer by Zenrigar Thursday, May 20, 2010 9:55 PM
    Thursday, May 20, 2010 9:21 PM

All replies

  • Does the error still occur if you disable any custom JavaScript you have on the form?


    Jeff Klosinski - www.sonomapartners.com
    Thursday, May 20, 2010 1:24 AM
  • Hi,

    check to make sure that you not deleted any default status reason for Won/Lost Status in Opportunity..

    1. Go to Settings – > Customization – > Customizable Settings -> Open Opportunity 

    2. Go to attributes -> Open statuscode attribute

    3. check here to make sure Won/Lost Status have got default status reason which comes with CRM 4.0

         Won

             - Won (value - 3)

         Lost

              - canceled (value - 4)

              - Lost to Competitoer (value - 5)

    if this pick list values does not exist then this could be your potential problem..

     

     

    Thursday, May 20, 2010 8:04 AM
  • Hello Jeff thanks for your reply.

    I tried disablin all custom javascript added to the opportunity form  and  doesn't work, the worst thing is that since we don't close a opportunity very often i don't keep the track of when this stopped working :S

     

     

    Thursday, May 20, 2010 3:45 PM
  • Thanks for your answer MayankP

     

    Actually your right, the status reasons of the LOST state are just custom ones, with values > 200000,no value 4 or 5

    Is there a way to get those default  values back? since can't be added again from CRM attribute because every new value will be >200000.

     

    The weird thing is i have 2 virtual environments for testing, in both environments i have the same status reasons, where 4 and 5 are missing, but in one of them the close dialog is working fine and showing just the custom values.

    The difference between the environments are that in one i have installed the latest rollup 10 for crm 4 in this one the Error Appear, and the other doesn't have any update and the dialog works, and now the weird thing is that the Production environment has no updates either so i don't know why is not working :S

     

    Is there a way to get those default values 4 and 5 back?

    Thanks for your time to answer!

     

    Thursday, May 20, 2010 4:10 PM
  • If you export the Opportunity entity from a deployment that has those values, and then import them back into the system missing them, that should solve the problem.  Another possibility is hacking the customization.xml export of the entity from the affected deployment (to add the missing values), and importing it back to restore them.
    Dave Berry
    Thursday, May 20, 2010 4:17 PM
    Moderator
  • On a side note, I'd have to say that something was done in your virtual, Update 10 environment that may have been pushed to your production system--causing the errors in both places  It's entirely possible that the missing defaults aren't the cause of the problem... but I'm inclined to trust MayankP's experience on this one.  If my recommedations don't work, however, I'd start looking for differences in deployed code/customizations to both virtual environments.
    Dave Berry
    Thursday, May 20, 2010 4:21 PM
    Moderator
  • Addendum to my last comment:

    If you need to compare two customization exports, use this utility:  http://msdn.microsoft.com/en-us/library/dd442453.aspx

    Caveat:  I'm not sure how it will work for patched/unpatched versions of CRM.  The article for it doesn't say.


    Dave Berry
    Thursday, May 20, 2010 4:26 PM
    Moderator
  • Hey David thanks for your answer, and for the link for the utility!

    I was using fiddler but not much help, and that comparison utility is a huge help!

    Giving a fast view using the comparison utility there's no much difference between entities of a patched CRM and the other without the patch.

    I'll dig comparing and adding the default values using the  modified XML and ill let u guys know what the results are.

    Thanks a lot for your time!

    Thursday, May 20, 2010 5:31 PM
  • Hi Zenrigar,

    as David has correctly pointed out, firstly I suggest get these 4,5 default values back on this entity using following steps.

    1. Export opportunity entity (settings -> customization -> export customization entity)

    2. Now extract zip file and open the xml and search for statua reason on opportunity entity

    3. Now you will list of status with their values , here you can these 4,5 values status back

    5. then import this xml back to your system and publish entity..

    see if this fixes this issue first ..if not then as david said you need start looking at the differance between two system..

     

    Thursday, May 20, 2010 7:00 PM
  • Hey MayankP thanks again for the time, i did add those values back but that was not the problem.

     

    After tests and some workaround and comparing the cuxtomizations.xml  i didn't see this thread about a person getting the errror when upgrading from crm3 to crm4

    http://social.microsoft.com/Forums/en-US/crm/thread/6e55035e-b16b-4766-ae11-586ef72aed9c

    and it's sad, what the error is.

    In my opportunity form the default field NAME is not being used so is located in a tab that is hidden for users, so when an opportunity is created the field NAME get a NULL value, i don't know why this has an impact on the close opportunity dialog, but replacing all the null values of the NAME field in the opportunity's table fixed the problem.

    Check the link that i posted, there are some others opinions in case somebody run in this error.

    Thanks for the time guys! :D

    • Edited by Zenrigar Thursday, May 20, 2010 9:23 PM fixed link
    • Marked as answer by Zenrigar Thursday, May 20, 2010 9:55 PM
    Thursday, May 20, 2010 9:21 PM