You need to sign in to do that
Don't have an account?
CJDEVCONPRO
List all of my Account ID's and main number into a ListBox
Is there a way I can list all of my account ID's with main phone numbers into a List Box control?
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
MyListBox.Items.Clear();
foreach (MyAccountObject Account in MyCollectionOfAccountObjects)
{
MyListBox.Items.Add(Account.ID.ToString() + " " + Account.Phone.ToString());
}
Tnx Simon.
Gareth
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
login()
Dim qr As sforce.QueryResult = binding.query("Select Id, Name, AccountNumber from Account")
For i As Integer = 0 To qr.records.GetUpperBound(0)
Dim account As sforce.sObject = qr.records(i)
ListBox1.Items.Add((i + 1) & ": " & getFieldValue("Name", account.Any) & " " & getFieldValue("AccountNumber", account.Any))
Next
End Sub