• Riyas
  • NEWBIE
  • 5 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies

Hi,

 

  I have two custom objects Blog & Comments, for each Comment, there is a parent Blog. So I have create a custom field of type Master-Detail Relationship for Comments  object with field name Blog_Post and relation ship name Comment_r

 

Now I want to show a Blog post and its associated comments in a page.  It is showing error while I am try to get all the comments for a blog post. The code used as follows:

<apex:page showHeader="false" standardcontroller="Blog__c">
<apex:repeat value="{!Blog__c.Comment__r}" var="comment">
                        <div>
                            <label>{!comment.Comment_User__c} 
                                <small>(
                                    <apex:outputText value="{0,date, EEE MMM d yyyy h:mm a}">
                                        <apex:param value="{!comment.Comment_date__c}" /> 
                                    </apex:outputText>
                                )</small>
                            </label>
                            <br /><br />
                            <p>{!comment.Comment_text__c}</p>
                            <br />  
                        </div>                  
                        </apex:repeat>
</apex:page>

 

 

I got the error as follows 

 

        

Description Resource Path Location Type
Save error: Invalid field Comment__r for SObject Blog_Post__c blogview.page /Blog/src/pages line 0 Force.com 

 

How can I show the blog with its comments?

 

 

 

 

  • April 09, 2012
  • Like
  • 1

Hi,

 

  I have two custom objects Blog & Comments, for each Comment, there is a parent Blog. So I have create a custom field of type Master-Detail Relationship for Comments  object with field name Blog_Post and relation ship name Comment_r

 

Now I want to show a Blog post and its associated comments in a page.  It is showing error while I am try to get all the comments for a blog post. The code used as follows:

<apex:page showHeader="false" standardcontroller="Blog__c">
<apex:repeat value="{!Blog__c.Comment__r}" var="comment">
                        <div>
                            <label>{!comment.Comment_User__c} 
                                <small>(
                                    <apex:outputText value="{0,date, EEE MMM d yyyy h:mm a}">
                                        <apex:param value="{!comment.Comment_date__c}" /> 
                                    </apex:outputText>
                                )</small>
                            </label>
                            <br /><br />
                            <p>{!comment.Comment_text__c}</p>
                            <br />  
                        </div>                  
                        </apex:repeat>
</apex:page>

 

 

I got the error as follows 

 

        

Description Resource Path Location Type
Save error: Invalid field Comment__r for SObject Blog_Post__c blogview.page /Blog/src/pages line 0 Force.com 

 

How can I show the blog with its comments?

 

 

 

 

  • April 09, 2012
  • Like
  • 1

Hi,

 

   I have a requirement to upload images from Salesforce to Facebook using graph API. The user add the image and test message in Salesforce,  then using Facebook Graph API I have to  update them to Facebook. I am success full in posting text messages.

 

        I have tried different options to update images from Salesforce, but no hope.  Can anyone help me to

 post the images.

 

Thanks,

Riyas

 

Hi,

 

  I have two custom objects Blog & Comments, for each Comment, there is a parent Blog. So I have create a custom field of type Master-Detail Relationship for Comments  object with field name Blog_Post and relation ship name Comment_r

 

Now I want to show a Blog post and its associated comments in a page.  It is showing error while I am try to get all the comments for a blog post. The code used as follows:

<apex:page showHeader="false" standardcontroller="Blog__c">
<apex:repeat value="{!Blog__c.Comment__r}" var="comment">
                        <div>
                            <label>{!comment.Comment_User__c} 
                                <small>(
                                    <apex:outputText value="{0,date, EEE MMM d yyyy h:mm a}">
                                        <apex:param value="{!comment.Comment_date__c}" /> 
                                    </apex:outputText>
                                )</small>
                            </label>
                            <br /><br />
                            <p>{!comment.Comment_text__c}</p>
                            <br />  
                        </div>                  
                        </apex:repeat>
</apex:page>

 

 

I got the error as follows 

 

        

Description Resource Path Location Type
Save error: Invalid field Comment__r for SObject Blog_Post__c blogview.page /Blog/src/pages line 0 Force.com 

 

How can I show the blog with its comments?

 

 

 

 

  • April 09, 2012
  • Like
  • 1