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
prasanth puvvada 4prasanth puvvada 4 

visualforce relatedlist custm objects error. please help

error in visual page output page: -   at  url:- https://c.ap2.visual.force.com/apex/relatedlist?id=a0128000003j6D4

'loan__c' is not a valid child relationship name for entity customer 





V.F code:-  not showing any errors. 


    
    Youre looking at some related lists for {!customer__c.Customer_name_del__c}:
    
  

    

   

 
Shrikant BagalShrikant Bagal
Hello prasanth,

I think you are using Object API name Instead of relationship name, Please try with the realationship name.

You will get the relationship name for that field as follow:

Go to Defination of loan__c field => you'll get the relationship name.

 hope it'll help you.
Amit Chaudhary 8Amit Chaudhary 8
Can you Please post your full code ?

I hope you need to user loans__r

Please let us know if this will help you.
Shrikant BagalShrikant Bagal
can you please post snipp of your code?
 
prasanth puvvada 4prasanth puvvada 4
this is a relatedlist program.     here the master object is customer__c, and details are transaction__c  and loan__C.    


I am sorry for your unconvinience,  i have posted my code in my question also, but why i dont know why the code is not inserted. 


The visual force page code:- 
 

    
    Youre looking at some related lists for {!customer__c.Customer_name_del__c}:
    

   

 
Shrikant BagalShrikant Bagal
don't add as Code sample

Comment as normal Text
prasanth puvvada 4prasanth puvvada 4

   
    Youre looking at some related lists for {!customer__c.Customer_name_del__c}:
   


   

   
prasanth puvvada 4prasanth puvvada 4
http://salesforce990293.blogspot.com/2015/06/my-code.html
Shrikant BagalShrikant Bagal
You have to use childRelationshipName not an relationship name;

Please refer following screenshot for clearification:

http://screencast.com/t/Zfe5ROrcV

hope its help you!!!!
prasanth puvvada 4prasanth puvvada 4
yes, amith, i also tried this, but not coming, not only this, transaction__c is not also not working.     
prasanth puvvada 4prasanth puvvada 4
i used api name of the object.      this same program is working well under standard objects.
Shrikant BagalShrikant Bagal
In standerd Object the the Child relationship name is Pural Name of Child Object so, you think they are using Object Api name.

Don't get confuss between Childrelationship Name and Object API Name.

just try "loans" instead of "loan__c"
prasanth puvvada 4prasanth puvvada 4
hi shrikant,    i tried as loan, loans, loan__c, loans__c   no use.   Thanks for reply.  And moreover is i enabled all things in custom object, that is 
1. allow reports, 
2. allow activities
3.track field history
4.allow in character groups.

i need to make any further changes for the relatedlist program. 
Shrikant BagalShrikant Bagal
Can you please share screenshot of "loan__c" field Defination Page.

Its help us.
prasanth puvvada 4prasanth puvvada 4
User-added image
Amit Chaudhary 8Amit Chaudhary 8
Hi Prasanth,

Please follow below steps:-

Step 1:- Go to Loans Object
Step 2:- Then Click on customer__cobject lookup and Click on same field and share the screen shot
Amit Chaudhary 8Amit Chaudhary 8
Please check blow post. I hope that will help you

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_relatedList.htm
https://help.salesforce.com/apex/HTViewSolution?id=000163440&language=en_US (https://help.salesforce.com/apex/HTViewSolution?id=000163440&language=en_US)


Thanks,
Amit Chaudhary
Amit Chaudhary 8Amit Chaudhary 8
NOTE :- Please try loans__r
Shrikant BagalShrikant Bagal
I need Screenshot of lookup field defination which present on "loan__c" object for relationship with "customer__c".