• MikeMcAllister
  • NEWBIE
  • 0 Points
  • Member since 2012

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

My challenge is understanding the data relations to be able to write a SOQL query to pull records that are the valid Categories assigned to a Community for Ideas created in a Community.

 

Has anyone 'out there' already done this and would be willing to share a code snippet of the SOQL query?

 

I don't have a problem with the Apex code to create the List<SelectOption> and assign it as the value of the <apex:selectList>. I just cannot seem to figure out the data relations between Community, Idea and Category.

 

Thanks in advance to anyone that can help.

 

Here's snippet of the UI definition. It might with understanding what I'm trying to do:

 

                     <apex:outputPanel >
                        <apex:selectList style="height: 340px" value="{!InternalCategoriesSelected}" multiselect="true">
                            <apex:selectOptions value="{!InternalCategoryItems}"/>
                        </apex:selectList>
                    </apex:outputPanel>
                    <apex:outputPanel >
                        <apex:selectList style="height: 340px" value="{!CustomerCategoriesSelected}" multiselect="true">
                            <apex:selectOptions value="{!CustomerCategoryItems}"/>
                        </apex:selectList>
                    </apex:outputPanel>

 

I'm trying to dynamically populate the "InternalCategoryItems" and "CustomerCategoryItems" lists with Category values based on the results of a SOQL query that pulls the valid Categories for those two Communities.

 

--Mike McAllister

 

My challenge is understanding the data relations to be able to write a SOQL query to pull records that are the valid Categories assigned to a Community for Ideas created in a Community.

 

Has anyone 'out there' already done this and would be willing to share a code snippet of the SOQL query?

 

I don't have a problem with the Apex code to create the List<SelectOption> and assign it as the value of the <apex:selectList>. I just cannot seem to figure out the data relations between Community, Idea and Category.

 

Thanks in advance to anyone that can help.

 

Here's snippet of the UI definition. It might with understanding what I'm trying to do:

 

                     <apex:outputPanel >
                        <apex:selectList style="height: 340px" value="{!InternalCategoriesSelected}" multiselect="true">
                            <apex:selectOptions value="{!InternalCategoryItems}"/>
                        </apex:selectList>
                    </apex:outputPanel>
                    <apex:outputPanel >
                        <apex:selectList style="height: 340px" value="{!CustomerCategoriesSelected}" multiselect="true">
                            <apex:selectOptions value="{!CustomerCategoryItems}"/>
                        </apex:selectList>
                    </apex:outputPanel>

 

I'm trying to dynamically populate the "InternalCategoryItems" and "CustomerCategoryItems" lists with Category values based on the results of a SOQL query that pulls the valid Categories for those two Communities.

 

--Mike McAllister