• AndySureDeposit
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies

The following line returns an error: 'basicSample_cs.apex.QueryResult' does not contain a definition for 'getRecords'

 

Account acct = (Account)qr.getRecords(i);

 

How can I use getRecords?

 

Thanks,
Andy

 

// below is actual code
qr = binding.query("SELECT Id, Name, (SELECT id,Account__c FROM ContactAccounts__r) FROM Account  WHERE CompanyId__c = " + strCompanyid);

if (qr.size > 0)
{
String[] ids = new String[qr.records.Length];
      for (int i = 0; i < ids.Length; i++)
      {
         ids[i] = qr.records[i].Id;
         Account acct = (Account)qr.getRecords(i); // does not compile!!!

      }
}

 

How can I associate a contact with more than one account? I am using the developer edition.

 

Instead of

 

contact.AccountId = strAccountId;

 

I need

 

contact.AccountId[0] = strAccountId1;
contact.AccountId[1] = strAccountId2;


Thanks,
Andy

 

I am evaluating salesforce. 

 

I am trying to create a new account but when I login to salesforce.com, then click on customer login, the 'create new' choices are only Event and Task. How do I create a new account?

 

Thanks,

Andy

The following line returns an error: 'basicSample_cs.apex.QueryResult' does not contain a definition for 'getRecords'

 

Account acct = (Account)qr.getRecords(i);

 

How can I use getRecords?

 

Thanks,
Andy

 

// below is actual code
qr = binding.query("SELECT Id, Name, (SELECT id,Account__c FROM ContactAccounts__r) FROM Account  WHERE CompanyId__c = " + strCompanyid);

if (qr.size > 0)
{
String[] ids = new String[qr.records.Length];
      for (int i = 0; i < ids.Length; i++)
      {
         ids[i] = qr.records[i].Id;
         Account acct = (Account)qr.getRecords(i); // does not compile!!!

      }
}

 

How can I associate a contact with more than one account? I am using the developer edition.

 

Instead of

 

contact.AccountId = strAccountId;

 

I need

 

contact.AccountId[0] = strAccountId1;
contact.AccountId[1] = strAccountId2;


Thanks,
Andy

 

I am evaluating salesforce. 

 

I am trying to create a new account but when I login to salesforce.com, then click on customer login, the 'create new' choices are only Event and Task. How do I create a new account?

 

Thanks,

Andy