I'm running the following query which contains a child => parent relationship between Case and Account - and contains the Account.Name in the SELECT:
string query = "SELECT Case.CaseNumber,Case.Account.Name,Case.Status FROM Case WHERE Status != 'Closed' AND OwnerId IN (SELECT Id FROM User WHERE Email = '" + userEmail + "') ORDER BY Account.Name";
var results = await client.QueryAsync<CaseWorkload>(query);
The CaseWorkload
class is defined as:
public class CaseWorkload
{
public string CaseNumber { get; set; }
public string Status { get; set; }
public string AccountName { get; set; }
}
I am unable to retrieve the AccountName
information as the returned SQL shows Account.Name
and I couldn't find a way in SOQL to alias a column. How should the class be created considering the given query?