08-24-2010 12:43 AM
Hi
I need to create an account lookup so that based on the account selected i need to populate the some field values in the text boxes in a form. I have added the account lookup with the following settings.
What Information will you be looking for?
Account
Which Property will recieve the result of this look up?
Account
Select How the look up control will display?
Dialog
Select the properties that you want to see in the grid?
AccountName
Type
Subtype
After this i want to fetch the selected account id programtically. But i am not getting which property will give me the primary key id
i have tried the following
lkupaccount.lookupresultvalue -- returing the account name but not id
lkupaccount.SeedValue - Getting error
Please suggest and help me in this
THanks in advance
Jack
Solved! Go to Solution.
08-24-2010 07:13 AM
08-25-2010 03:05 AM
Hi
I have got solution to the above problem.
On lookup change event / else in page load write the following code for getting the id of the selected record. Please note that this will help when ever look up is built on a table and not bounded to any field. Depends on the look up you built the Interface element below will change(In my Case it is account so i have created interface for account)
Sage.Entity.Interfaces.IAccount acc = lkupaccount.LookupResultValue as Sage.Entity.Interfaces.IAccount; string acctID = acc.Id.ToString();
Thanks
Jack
08-25-2010 08:55 AM
If you set the "lookingbindingmode" to String instead of Object you will get the accountid in the propertie "lookupresultvalue"...