Activity Forums Salesforce® Discussions What is the difference between __c and __r in salesforce ?

  • Laveena

    Member
    September 3, 2019 at 10:44 am

    Hi Nikita,

    __c refers directly to a custom object whereas __r refers to a reference (a relationship) between two objects such as the parent-child object relationship or child-parent object relationship in order to help you 'get' or 'navigate' to the parent from a child or vice versa.

    Thanks

  • Saddam

    Member
    September 3, 2019 at 11:17 am

    Hi Nikita,

    __c is for Custom objects For example: Custom_Object__c . It is used for reference custom object in Apex or visualforce page, formula field etc internally. Used as suffix.

    __r is for Custom objects reference For example: Custom_Object__r . It is used for reference custom object relationship name in Apex or visualforce page, formula field etc. Used as suffix.

Log In to reply.

Popular Salesforce Blogs

Success Stories – How DemandBlue Helped Its Clients Improve Revenue Recognition with Salesforce Revenue Cloud Implementation

Blog in

Businesses that deal with subscription-based contracts, usage-based billing or other complex contracts face several difficulties in managing their billing cycle. Though Salesforce CPQ implementation does the heavy-lifting…

Popular Salesforce Videos