I am using the following string in a dynamic soql:
SELECT id, name, orderdate__c, status__c, sold_To_Customer__r.id, sold_To_Customer__r.name, sold_To_Customer__r.customerreference__c, bill_To_Customer__r.id, bill_To_Customer__r.name, bill_To_Customer__r.customerreference__c, Case__r.CaseNumber, Case__r.Reason, Case__r.ContactEmail, Case__r.Description, Campaign__r.Name, Campaign__r.Description FROM Staging_order__c WHERE name = 'SO-1900000020'
List<sObject> sobjList = Database.query(upper string);
I want to get for example the case description. I tried:
system.debug(sobjList.get(0).case__r.Description);
On saving my class I get the error:
Variable does not exist: case__r