Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
Copper Elite Contributor
henrycohen29
Posts: 70
Registered: ‎04-30-2009

SLX Web 7.5.1 - Contact.SaveContactAccount

Hi,

 

 

I am trying to create a contact record from the AddEditContactAssociation form. The BindingSource for the form is IAssociation. AndI am getting the following error in the eventLog:

 
2009-08-14 09:32:08,251 ERROR SlxClient.ContactPage - Unhandled exception occurred during async postback.
Sage.Platform.DynamicMethod.DynamicMethodException: An exception occurred executing the dynamic method Contact.SaveContactAccount. ---> NHibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: ADMIN       , of entity: Sage.SalesLogix.Security.Manager

   at NHibernate.Engine.StatefulPersistenceContext.CheckUniqueness(EntityKey key, Object obj)
   at NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.PerformUpdate(SaveOrUpdateEvent event, Object entity, IEntityPersister persister)

   at NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.EntityIsDetached(SaveOrUpdateEvent event)
   at NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.PerformSaveOrUpdate(SaveOrUpdateEvent event)
   at NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.OnSaveOrUpdate(SaveOrUpdateEvent event)
   at NHibernate.Impl.SessionImpl.FireSaveOrUpdate(SaveOrUpdateEvent event)
   at NHibernate.Impl.SessionImpl.SaveOrUpdate(String entityName, Object obj)
   at NHibernate.Engine.CascadingAction.SaveUpdateCascadingAction.Cascade(IEventSource session, Object child, String entityName, Object anything, Boolean isCascadeDeleteEnabled)

   at NHibernate.Engine.Cascade.CascadeToOne(Object child, IType type, CascadeStyle style, Object anything, Boolean isCascadeDeleteEnabled)

   at NHibernate.Engine.Cascade.CascadeAssociation(Object child, IType type, CascadeStyle style, Object anything, Boolean isCascadeDeleteEnabled)

   at NHibernate.Engine.Cascade.CascadeProperty(Object child, IType type, CascadeStyle style, Object anything, Boolean isCascadeDeleteEnabled)

   at NHibernate.Engine.Cascade.CascadeOn(IEntityPersister persister, Object parent, Object anything)
   at NHibernate.Event.Default.AbstractSaveEventListener.CascadeBeforeSave(IEventSource source, IEntityPersister persister, Object entity, Object anything)

   at NHibernate.Event.Default.AbstractSaveEventListener.PerformSaveOrReplicate(Object entity, EntityKey key, IEntityPersister persister, Boolean useIdentityColumn, Object anything, IEventSource source, Boolean requiresImmediateIdAccess)

   at NHibernate.Event.Default.AbstractSaveEventListener.PerformSave(Object entity, Object id, IEntityPersister persister, Boolean useIdentityColumn, Object anything, IEventSource source, Boolean requiresImmediateIdAccess)

   at NHibernate.Event.Default.AbstractSaveEventListener.SaveWithGeneratedId(Object entity, String entityName, Object anything, IEventSource source, Boolean requiresImmediateIdAccess)

   at NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.SaveWithGeneratedOrRequestedId(SaveOrUpdateEvent event)
   at NHibernate.Event.Default.DefaultSaveEventListener.SaveWithGeneratedOrRequestedId(SaveOrUpdateEvent event)
   at NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.EntityIsTransient(SaveOrUpdateEvent event)
   at NHibernate.Event.Default.DefaultSaveEventListener.PerformSaveOrUpdate(SaveOrUpdateEvent event)
   at NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.OnSaveOrUpdate(SaveOrUpdateEvent event)
   at NHibernate.Impl.SessionImpl.FireSave(SaveOrUpdateEvent event)
   at NHibernate.Impl.SessionImpl.Save(Object obj)
   at Sage.SalesLogix.Entities.Contact.Save() in c:\Documents and Settings\Administrator\Application Data\Sage\Platform\Output\implementation\Contact.cs:line 2806

   at Sage.SalesLogix.Entities.Contact.Sage.Platform.Orm.Interfaces.IPersistentEntity.Save() in c:\Documents and Settings\Administrator\Application Data\Sage\Platform\Output\implementation\Contact.cs:line 2929

   at Sage.SalesLogix.Contact.Rules.SaveContactAccount(IContact contact, IAccount account, String& result)
   at (Object )
   at Sage.Platform.DynamicMethod.DynamicMethodLibrary.Execute(String methodName, Object[] args)
   --- End of inner exception stack trace ---
   at Sage.Platform.DynamicMethod.DynamicMethodLibrary.Execute(String methodName, Object[] args)
   at Sage.SalesLogix.Entities.Contact.SaveContactAccount(IAccount account) in c:\Documents and Settings\Administrator\Application Data\Sage\Platform\Output\implementation\Contact.cs:line 3045

   at SmartParts_Association_AddEditContactAssociation.GetGSContact()
   at SmartParts_Association_AddEditContactAssociation.btnSave_ClickAction(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
   at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

 

Any ideas?

 

 

 

  Thanks

~ Henry

 

Please use plain text.