08-24-2010 12:43 AM
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?
Which Property will recieve the result of this look up?
Select How the look up control will display?
Select the properties that you want to see in the grid?
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
Solved! Go to Solution.
08-25-2010 03:05 AM
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();