• paulie69
  • NEWBIE
  • 0 Points
  • Member since 2003

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

I am trying to use describe to get layout information but I don't understand how to do it. I can get global and account but layout is elusive. Am I missing something in the docs?

regards,

Paul

Just to let you know -

I search for xxx which does not exist.

The following code gets a true returned

if(sForce.SampleSearch(accountName,out accountID))

{

if(accountID.Length > 1)

{

int i;

Console.WriteLine("Found multiple matching accounts (" + accountID.Length + ")...");

for(i=accountID.GetLowerBound(0);i<=accountID.GetUpperBound(0);i++)

{

Console.WriteLine("\t" + (i + 1) + ": account " + accountID[i] + " using " + accountName + " as the search value.");

}

}

else

{

Console.WriteLine("Found the account " + accountID[0] + " using " + accountName + " as the search value.");

}

}

else

{

Console.WriteLine("Could not find an account using " + accountName);

}

 

What happens is the accountId array length is zero but the test is greater than 1 so the fall through tries to access item 0 of an array that has no item.

Regards,

Paul