Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Avid Listener
Posts: 17
Registered: ‎03-09-2010

Retrieving an account's accountmanagerid



SLX Web 7.5.1


On the account details form how when a user has changed the account manager to a different user how can I retrieve the USERID of the newly selected user before the record is saved - in the LAN I would have just used the lookupcontrol.LookupID


I need to be able to change the value of another field on the pop up return of the account manager field.



Bronze Super Contributor
Posts: 129
Registered: ‎06-09-2009

Re: Retrieving an account's accountmanagerid

The User Control has a LookupResultValue.

- If the binding mode is set to string, this value would be the UserID.

string uID = usrControl.LookupResultValue; 


- If the binding mode is set to Object, this value would be an IUser object, so you could cast it and then retreive the ID from it.

IUser usr = usrControl.LookupResultValue;

string uID = usr.Id.ToString(); 


Additionally, if the field is bound, the corresponding Property of the Main Entity would be set to the new Value as well:

In the case of the Account, it would be as well an IUser object: entity.AccountManager:

IUser usr = acctEntityObj.AccountManager;

string uID = usr.Id.ToString();


Raul A. Chavez