03-19-2012 01:39 PM
Thanks for the reply, I was targeting .net 3.5 from VS and have changed to target .net 4. I have the full .net 4 installed on the PC. I still get the reference Issue!
03-19-2012 01:45 PM
03-20-2012 01:00 AM
Any input is appreciated; I don't know if it is significant but I can successfully implement lots of other interactivity between user controls and ACT, this appears to be the fly in the ointment! Everything works fine I can debug the code until the opportunity is updated to 'Closed - Won' or 'Closed - Lost' by checking the radio button in ACT.
03-20-2012 02:03 PM
I was pointed towards the logviewer application by another forum and have extracted the following exception are you able to see why this exception is occurring.
System.NullReferenceException: Object reference not set to an instance of an object. at Act.UI.OpportunityView.OpportunityDetailView.StatusChanged(OpportunityStatus newStatus) at Act.Framework.ComponentModel.StatusGroup.StatusChangedEvent.Invoke(OpportunityStatus newStatus) at Act.Framework.ComponentModel.StatusGroup.wonRadio_CheckedChanged(Object sender, EventArgs e) at System.Windows.Forms.RadioButton.OnCheckedChanged(EventArgs e) at System.Windows.Forms.RadioButton.set_Checked(Boolean value) at System.Windows.Forms.RadioButton.OnClick(EventArgs e) at System.Windows.Forms.RadioButton.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(Form mainForm) at Act.Application.SingletonApp.Run(Form startupForm) at Act.Application.Act.Main(String args)
03-21-2012 12:33 AM
You shouldn't use .NET 4.0 ACT! was written using .NET 3.5 so writing plugins using .NET 4.0 will cause problems.
As far as your problem is concerned you have an object that doesn't exist yet. I would just put a breakpoint where you are assigning the current opportunity to "o" and step through the routine and see what object is missing. If you are trying to create the opportunity and change the status at the same time you won't be able to display the ID because the ID doesn't exist until the opportunity is saved for the first time (or at least that's the way it has always worked with other entities like history in the past). I haven't actually tested the code like Jim has but he was probably testing with an existing opportunity.