Skip to main content The Trailblazer Community will be unavailable from 2/1/2025 to 2/2/2025. Please plan your activities accordingly.
Ian Quah asked in #Apex

Public Clinic_Patient__c patient{get;set;}

Public Clinic_Patient__c patient_owner{get;set;}

Public String SurgeryID{get;set;}

SurgeryID = System.currentPageReference().GetParameters().get('SurgeryID');

patient = [SELECT Patient_Name__c FROM Clinic_Patient__c where Id = :SurgeryID];

patient_owner = [SELECT Owner.Name, Owner.firstname, Owner.email FROM Clinic_Patient__c where Id = :SurgeryID];

My sample code is as above. When I do

 

System.debug(patient_owner)

all I see is just the OwnerID, and the ID (I do not see Name, firstname or email). Does anyone know what's happening? I have verified that those things exists and that it should not be null or empty.

1 answer
0/9000