I am trying to get the related Case.Origin from MessagingSession, whenever I do the query on dev console or salesforce inspector, I can get the Case.Origin. However on my actual code it doesn't return any Case.Origin to my lwc
Here is my code:
Apex:
List<MessagingSession> messagingSessions = new List<MessagingSession>();
messagingSessions = [SELECT Id, Case.Origin, CaseId, Status, StartTime, EndTime
FROM MessagingSession
ORDER BY StartTime DESC];
return messagingSessions;
LWC:
for(c in response.messagingSessions){
let o = response.messagingSessions[c];
this.id = o.Id;
this.origin = o.Case.Origin;
this.caseId = o.CaseId;
this.status = o.Status;
this.startTime = o.StartTime;
this.endTime = o.EndTime;
}
I am getting values on id, caseId, status, startTime & endTime however the origin is blank. But whenever I perform the query on dev console or salesforce inspector the Case.Origin has values