7/5/2025 3:30:46 PM
|
|
slxdeveloper.com Community Forums |
|
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
|
|
|
|
Problems Adding Opportunities in Web 7.2
Posted: 18 Apr 08 11:12 AM
|
We are upgrading to Web Client 7.2 (Service Pak 2). When we try to add a new Opportunity we get the following error:
Server Error in '/SlxClient' Application. --------------------------------------------------------------------------------
Object reference not set to an instance of an object. Description: 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.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 1780: DynamicMethodLibrary lib = DynamicMethodLibraryHelper.Instance; Line 1781: Object[] methodArgs = new Object[] { instance }; Line 1782: lib.Execute("Opportunity.OnCreate", methodArgs); Line 1783: return instance; Line 1784: } Has anyone encountered this. Any help would be greatly appreciated!!!
Thanks in Advance! |
|
|
|
Re: Problems Adding Opportunities in Web 7.2
Posted: 21 Apr 08 7:57 AM
|
I have the same problem. Before apply the SP2 was working fine. In fact, I get the same error if I change the settings for Insrt Opportunity under User options. |
|
|
| |
|
Re: Problems Adding Opportunities in Web 7.2
Posted: 29 Jun 09 2:06 PM
|
Am also experiencing this issue. We are looking at moving remote users to the web client.
I tried the suggestion here http://www.slxdeveloper.com/devhome/forum.aspx?forumid=4002&postid=13221, but it made no difference.
I get the error on line 1650:
Line 1648: DynamicMethodLibrary lib = DynamicMethodLibraryHelper.Instance; Line 1649: Object[] methodArgs = new Object[] { instance }; Line 1650: lib.Execute("Opportunity.OnCreate", methodArgs); Line 1651: return instance; Line 1652: }
in source file {PATH}\Sage\Platform\Output\implementation\Opportunity.cs
Stack trace: [NullReferenceException: Object reference not set to an instance of an object.] Sage.SalesLogix.Opportunity.Rules.OnCreate(IOpportunity opportunity) +938 (Object ) +29 Sage.Platform.DynamicMethod.DynamicMethodLibrary.Execute(String methodName, Object[] args) +38
[DynamicMethodException: An exception occured execution the dynamic method Opportunity.OnCreate.] Sage.Platform.DynamicMethod.DynamicMethodLibrary.Execute(String methodName, Object[] args) +178 Sage.SalesLogix.Entities.Opportunity.Create() in c:\Documents and Settings\Edwardw\Application Data\Sage\Platform\Output\implementation\Opportunity.cs:1650 Sage.Platform.NHibernateRepository.NHibernateRepository.CreateImpl() +12 Sage.Platform.NHibernateRepository.NHibernateRepository.Sage.Platform.Repository.IRepository.Create() +5 Sage.Platform.Services.EntityFactoryContextService.GetEntity() +131 Sage.Platform.WebPortal.EntityPage.OnUnload(EventArgs e) +152 System.Web.UI.Control.UnloadRecursive(Boolean dispose) +257 System.Web.UI.Page.UnloadRecursive(Boolean dispose) +20 System.Web.UI.Page.ProcessRequestCleanup() +40 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +213 System.Web.UI.Page.ProcessRequest() +86 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18 System.Web.UI.Page.ProcessRequest(HttpContext context) +49 ASP.insertopportunity_aspx.ProcessRequest(HttpContext context) +4 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +358 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
|
|
|
| |
|
Re: Problems Adding Opportunities in Web 7.2
Posted: 29 Jun 09 4:34 PM
|
I don't know if there has been an official fix for this, but as per the original article, the problem occurs due to Defaults, however there are several this to look into.
The best option is to run the SLX Profiler while creating the Opportunity and see if you could compare from the Queries being executed where the error is ocurring. If I am not mistaken (and I could be) object +29 may mean that in this case it is ocurring within line 29 of the function, which may relate to Default Currency.
Take a peak at the oncreate method so that you could see the code being executed and where it could break (this is from 7.5.1): public static void OnCreate(IOpportunity opportunity) { TValueType type; SLXUserService service = ApplicationContext.Current.Services.Get() as SLXUserService; IUserOptionsService service2 = ApplicationContext.Current.Services.Get(); opportunity.Status = service2.GetCommonOption("pklStatus", "OpportunityDefaults"); opportunity.CloseProbability = new int?(Convert.ToInt32(service2.GetCommonOption("pklProbability", "OpportunityDefaults"))); opportunity.Type = service2.GetCommonOption("pklType", "OpportunityDefaults"); opportunity.EstimatedClose = new DateTime?(getEstClose()); opportunity.AddToForecast = false; SetDefaultContext(opportunity); if (opportunity.Account != null) { if (service2.GetCommonOption("chkDefaultDescription", "OpportunityDefaults") == "T") { opportunity.Description = getOppDescription(opportunity.Account.AccountName, opportunity.Account.Opportunities.Count); } service.GetUser(); opportunity.Owner = opportunity.Account.Owner; opportunity.AccountManager = opportunity.Account.AccountManager; } opportunity.SalesPotential = 0.0; opportunity.ActualAmount = 0; opportunity.DateOpened = new DateTime?(DateTime.UtcNow); opportunity.ExchangeRateCode = service2.GetCommonOption("lveCurrency", "OpportunityDefaults"); if (string.IsNullOrEmpty(opportunity.ExchangeRateCode)) { opportunity.ExchangeRateCode = "USD"; } IExchangeRate byId = EntityFactory.GetById(opportunity.ExchangeRateCode); === HERE IS WHERE I SUSPECT YOUR SYSTEM MAY BE BREAKING. THE CODE IS DEFAULTING TO USD, opportunity.ExchangeRate = new double?(byId.Rate.GetValueOrDefault(1.0)); === BUT YOU MAY NOT HAVE AN ENTRY FOR IT ON THE EXCHANGE RATE TABLE (I DID RUN INTO THIS opportunity.ExchangeRateDate = new DateTime?(DateTime.UtcNow); === DURING AN UPGRADE FROM 6.2 TO 7.2) DelphiStreamReader reader = new DelphiStreamReader(SystemInformationRules.GetSystemInfo().Data); if (reader.FindProperty("LockOpportunityRate", out type)) { opportunity.ExchangeRateLocked = new bool?(Convert.ToBoolean(type)); } }
|
|
|
|
Re: Problems Adding Opportunities in Web 7.2
Posted: 29 Jun 09 4:43 PM
|
I have to admit I am somewhat in the dark. I inherited maintenance on the SLX installation and am not all that familiar with it. I personally would have preferred to upgrade to 7.5 but we apparently how customizations running which won't take too kindly to the new version.
I took a shot in the dark (after backing up everything) and installed hotfix 23 for 7.2. It appears to have resolved the error message.
Thanks for your help & insight! |
|
|
| |
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|