fiogf49gjkf0d We use a large nymber of teams in our global deployment, the business would like to have the owner fields set based on the accountmanager being selected. So you choose accountmanager A the owner fields should change to be the accountmanager's default team.
I run a small code query the DB get the default seccodeid.. try to chnage the Owner.id and I get error that the Owner.Id is read only.. Has someone come across this or am I missing something simple.. I'd be voting on the later..
=====
Sage.Entity.Interfaces.IAccount acct = this.BindingSource.Current as Sage.Entity.Interfaces.IAccount
;
Sage.Platform.Orm.SessionScopeWrapper session = new Sage.Platform.Orm.SessionScopeWrapper
();
string qry = String.Format("Select us.DefaultSeccodeId Team From UserSecurity us Where us.Userid = '{0}'
,acct.AccountManager.Id.ToString());
NHibernate.IQuery query = (NHibernate.IQuery)session.CreateSQLQuery(qry).AddScalar("Team", NHibernate.NHibernateUtil
.String);
System.Collections.IList
list = query.List();
foreach(object listitem in
list){
acct.Owner.Id = (listitem.ToString());
}
================
Thanks |