You need to sign in to do that
Don't have an account?
Arvind Balijepalli
why isnt this code isnt printing whats there in system.debug
i am running below indeveloper console and it doesnt print system.debug ? i suspect something wrong with the way list is retrieved ? pls let me know
list<list<Sobject>> results = [find '4155557000' in PHONE FIELDS RETURNING contact(Phone, FirstName, LastName),
Account(Id, Phone, Name)];
list<Sobject> results1=results[0];
for(Sobject r : results1)
{
if(r.getSobjectType()==Account.sObjectType)
{
account acc = (account)r;
system.debug('value is ' + acc.Name);
}
}
list<list<Sobject>> results = [find '4155557000' in PHONE FIELDS RETURNING contact(Phone, FirstName, LastName),
Account(Id, Phone, Name)];
list<Sobject> results1=results[0];
for(Sobject r : results1)
{
if(r.getSobjectType()==Account.sObjectType)
{
account acc = (account)r;
system.debug('value is ' + acc.Name);
}
}
Here is the code:
results[0[ will return list of Contacts
results[1] will return list of Accounts. Please do let me know if it helps you.
Regards,
Mahesh
All Answers
Here is the code:
results[0[ will return list of Contacts
results[1] will return list of Accounts. Please do let me know if it helps you.
Regards,
Mahesh