You need to sign in to do that
Don't have an account?
Rahul Reddy 1
Soql Query for Master Detail Object
Amount Object to retrive and print Amount and Payment Type from Amount Object and Customer Name (Master Detail), Customer Email, Customer Phone from Customer Object
List <Amount__c> AM = [SELECT Amount, Payment_Type__C, Customer_Name__r.Name,Customer_Email__c, Customer_Phone__c From Amount__C];
System.debug(AM);
It prints some reference ID for Customer_Name__r.Name instead of the the customer name also not sure how to print Customer_Email__C and Customer_Phone__C.
Help would be highly appreciated.
List <Amount__c> AM = [SELECT Amount, Payment_Type__C, Customer_Name__r.Name,Customer_Email__c, Customer_Phone__c From Amount__C];
System.debug(AM);
It prints some reference ID for Customer_Name__r.Name instead of the the customer name also not sure how to print Customer_Email__C and Customer_Phone__C.
Help would be highly appreciated.
You can run following query
Thanks,
Himanshu
Salesforce Certified Developer | Administrator | Service Cloud Consultant
P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.
It still prints reference for Customer_Name__r.Name instead of the Name.
Regards
Rahul
Are you able to get Customer_Email__c and Customer_Phone__c ? if yes kindly check Name field record type whether it is set as AutoNumber instead of text.
Thanks,
Himanshu