Community
Showing results for 
Search instead for 
Do you mean 
Reply

System.Data.DuplicateNameException in Act.Framework.Opportunities.Opportunity.set_Stage.

Copper Contributor
Posts: 151
Country: Netherlands

System.Data.DuplicateNameException in Act.Framework.Opportunities.Opportunity.set_Stage.

[ Edited ]

Hi,

 

we have a client which uses a custom made add-on of ours, which duplicates an opportunity.

A part of this is that the stage of the copies opportunity is set to a certain configured stage.

 

This all works perfectly for all users, except for one user, for him the stage isn't set.

(The client has a setup with one Act! db server and multiple windows clients).

 

His ACTLOG.xml tells me this:

 <Message Timestamp="9:57:13.687" Type="Exception" Category="UI" Severity="Error">
      <ErrorType>System.Data.DuplicateNameException_x002C__x0020_System.Data_x002C__x0020_Version_x003D_4.0.0.0_x002C__x0020_Culture_x003D_neutral_x002C__x0020_PublicKeyToken_x003D_b77a5c561934e089</ErrorType>
      <Message><![CDATA[A_x0020_DataTable_x0020_named_x0020__x0027_OldStageStartDate_x0027__x0020_already_x0020_belongs_x0020_to_x0020_this_x0020_DataSet.]]></Message>
      <StackTrace>System.Data.DuplicateNameException_x003A__x0020_A_x0020_DataTable_x0020_named_x0020__x0027_OldStageStartDate_x0027__x0020_already_x0020_belongs_x0020_to_x0020_this_x0020_DataSet._x000D__x000A__x0020__x0020__x0020_at_x0020_System.Data.DataTableCollection.RegisterName_x0028_String_x0020_name_x002C__x0020_String_x0020_tbNamespace_x0029__x000D__x000A__x0020__x0020__x0020_at_x0020_System.Data.DataTableCollection.BaseAdd_x0028_DataTable_x0020_table_x0029__x000D__x000A__x0020__x0020__x0020_at_x0020_System.Data.DataTableCollection.Add_x0028_DataTable_x0020_table_x0029__x000D__x000A__x0020__x0020__x0020_at_x0020_Act.Framework.Opportunities.Opportunity.set_Stage_x0028_Stage_x0020_value_x0029__x000D__x000A__x0020__x0020__x0020_at_x0020_OppDuplicatorGouda.AppLogic.Controller.DupliceerOpportunity_x0028_Opportunity_x0020_original_x0029__x000D__x000A__x0020__x0020__x0020_at_x0020_OppDuplicatorGouda.Class1.DupliceerOpportunity_x0028_String_x0020_command_x0029__x000D__x000A__x0020__x0020__x0020_at_x0020_Act.UI.ActApplication.ExecuteCommand_x0028_String_x0020_command_x0029__x000D__x000A__x0020__x0020__x0020_at_x0020_Act.UI.ActApplication.BarItemClick_x0028_Object_x0020_sender_x002C__x0020_EventArgs_x0020_e_x0029__x000D__x000A__x0020__x0020__x0020_at_x0020_DevComponents.DotNetBar.DotNetBarManager.90_x0028_BaseItem_x0020_2H1_x0029__x000D__x000A__x0020__x0020__x0020_at_x0020_DevComponents.DotNetBar.BaseItem.RaiseClick_x0028__x0029__x000D__x000A__x0020__x0020__x0020_at_x0020_DevComponents.DotNetBar.BaseItem.InternalMouseUp_x0028_MouseEventArgs_x0020_objArg_x0029__x000D__x000A__x0020__x0020__x0020_at_x0020_DevComponents.DotNetBar.PopupItem.InternalMouseUp_x0028_MouseEventArgs_x0020_objArg_x0029__x000D__x000A__x0020__x0020__x0020_at_x0020_DevComponents.DotNetBar.ButtonItem.InternalMouseUp_x0028_MouseEventArgs_x0020_objArg_x0029__x000D__x000A__x0020__x0020__x0020_at_x0020_DevComponents.DotNetBar.BaseItem.InternalMouseUp_x0028_MouseEventArgs_x0020_objArg_x0029__x000D__x000A__x0020__x0020__x0020_at_x0020_DevComponents.DotNetBar.GenericItemContainer.InternalMouseUp_x0028_MouseEventArgs_x0020_objArg_x0029__x000D__x000A__x0020__x0020__x0020_at_x0020_DevComponents.DotNetBar.Bar.OnMouseUp_x0028_MouseEventArgs_x0020_e_x0029__x000D__x000A__x0020__x0020__x0020_at_x0020_System.Windows.Forms.Control.WmMouseUp_x0028_Message_x0026__x0020_m_x002C__x0020_MouseButtons_x0020_button_x002C__x0020_Int32_x0020_clicks_x0029__x000D__x000A__x0020__x0020__x0020_at_x0020_System.Windows.Forms.Control.WndProc_x0028_Message_x0026__x0020_m_x0029__x000D__x000A__x0020__x0020__x0020_at_x0020_DevComponents.DotNetBar.Bar.WndProc_x0028_Message_x0026__x0020_m_x0029__x000D__x000A__x0020__x0020__x0020_at_x0020_System.Windows.Forms.Control.ControlNativeWindow.OnMessage_x0028_Message_x0026__x0020_m_x0029__x000D__x000A__x0020__x0020__x0020_at_x0020_System.Windows.Forms.Control.ControlNativeWindow.WndProc_x0028_Message_x0026__x0020_m_x0029__x000D__x000A__x0020__x0020__x0020_at_x0020_System.Windows.Forms.NativeWindow.Callback_x0028_IntPtr_x0020_hWnd_x002C__x0020_Int32_x0020_msg_x002C__x0020_IntPtr_x0020_wparam_x002C__x0020_IntPtr_x0020_lparam_x0029_</StackTrace>
    </Message>

As fas as I know Act.Framework.Opportunities.Opportunity.set_Stage isn't even a public method which can be used by developers, but more like a private internal funciton, so it looks like something goes wrong in the Framework itself.

 

My code for updating the stage:

newOpportunity.Stage = ActHelper.getStage(Config.Stage_Revisie); // returns a Stage object

newOpportunity.Status = OpportunityStatus.Inactive; 
newOpportunity.Update();

 

What can this be? And why does it only occur with one user? (My colleagues and I cannot reproduce it either on our own systems)

Greetings,

ACT Certified Consultants
TendenZ
the Netherlands
Astute Commentator
Posts: 24
Country: United_Kingdom

Re: System.Data.DuplicateNameException in Act.Framework.Opportunities.Opportunity.set_Stage.

Hi Tendenz,

Is there anything different about this act user compared to the others? For example the user security role or User name compared to Contact name