function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
mahesh admin 3mahesh admin 3 

is it possible to call a child object field from parent object?

Ramesh KallooriRamesh Kalloori
Please go through the below link.

http://www.salesforce.com/us/developer/docs/soql_sosl/Content/sforce_api_calls_soql_relationships.htm

Child to parent:
List<BankNameSpace__Obj1__c> obj=[Select BankNameSpace__BSELookup__r.Name,Name from BankNameSpace__Obj1__c];
SELECT Id, Name, Account.Name
FROM Contact

Parent to child
List<BankNameSpace__BSE__c> obj1=[Select BankNameSpace__BSE__c.Name,(Select Name from BankNameSpace__BSE__c.BankNameSpace__Obj1__r)  from BankNameSpace__BSE__c];

SELECT Name,
  (
    SELECT LastName
    FROM Contacts
  )
FROM Account

let me know if you have any queries.

thanks,
Ramesh