You need to sign in to do that
Don't have an account?
munna123
how to get the records with notes and attachments of an object selected
here is my code.... here am getting all objects. but i need only the selected ones.how can i get only the selected objects and also should get notes and attachments for the records of a selected object...
vf page:
<apex:page controller="dynamic1" >
<apex:form id="op">
<apex:pageBlock >
<apex:pageBlockSection id="od1" columns="1">
<apex:pageBlockSection >
<apex:pageBlockSectionItem >
<apex:outputLabel value="Object List"></apex:outputLabel>
<apex:selectList size="1" value="{!selectedobj}">
<apex:selectOptions value="{!objects}" ></apex:selectOptions>
<apex:actionSupport action="{!details}" event="onchange" rerender="op"/>
</apex:selectList>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
<br/>
<br/>
<br/>
<apex:pageBlockSection >
<apex:pageBlockSectionItem >
<apex:outputLabel value="fields List:"></apex:outputLabel>
<apex:panelGrid columns="3" id="od" >
<apex:panelGroup style="width:40%" >
<apex:selectList size="6" value="{!sfields}" multiselect="true" style="width:200px;hieght:150px;">
<apex:selectOptions value="{!fnoption}"></apex:selectOptions>
</apex:selectList>
</apex:panelGroup>
<apex:panelGroup style="width:20%;hieght:120px;">
<table hieght="120px">
<tr><td><apex:commandButton value="Add" action="{!addfields}" style="width:80px;" reRender="od" /> </td></tr>
<tr><td><apex:commandButton value="Remove" action="{!removefields}" style="width:80px;" reRender="od1" /> </td></tr>
</table>
</apex:panelGroup>
<apex:panelGroup >
<apex:selectList size="6" value="{!rfields}" multiselect="true" style="width:200px;hieght:150px;">
<apex:selectOptions value="{!fsoption}"></apex:selectOptions>
</apex:selectList>
</apex:panelGroup>
</apex:panelGrid>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
<apex:pageBlockSectionItem >
<apex:pageBlockTable value="{!mydata}" var="a" >
<apex:repeat value="{!myfields}" var="b">
<apex:column value="{!a[b]}"/>
</apex:repeat>
</apex:pageBlockTable>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
<br/>
<br/>
<br/>
<apex:commandButton value="click" action="{!querymydeta}" reRender="op"/>{!query}
</apex:pageBlock>
</apex:form>
</apex:page>
controller:
<apex:page controller="dynamic1" >
<apex:form id="op">
<apex:pageBlock >
<apex:pageBlockSection id="od1" columns="1">
<apex:pageBlockSection >
<apex:pageBlockSectionItem >
<apex:outputLabel value="Object List"></apex:outputLabel>
<apex:selectList size="1" value="{!selectedobj}">
<apex:selectOptions value="{!objects}" ></apex:selectOptions>
<apex:actionSupport action="{!details}" event="onchange" rerender="op"/>
</apex:selectList>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
<br/>
<br/>
<br/>
<apex:pageBlockSection >
<apex:pageBlockSectionItem >
<apex:outputLabel value="fields List:"></apex:outputLabel>
<apex:panelGrid columns="3" id="od" >
<apex:panelGroup style="width:40%" >
<apex:selectList size="6" value="{!sfields}" multiselect="true" style="width:200px;hieght:150px;">
<apex:selectOptions value="{!fnoption}"></apex:selectOptions>
</apex:selectList>
</apex:panelGroup>
<apex:panelGroup style="width:20%;hieght:120px;">
<table hieght="120px">
<tr><td><apex:commandButton value="Add" action="{!addfields}" style="width:80px;" reRender="od" /> </td></tr>
<tr><td><apex:commandButton value="Remove" action="{!removefields}" style="width:80px;" reRender="od1" /> </td></tr>
</table>
</apex:panelGroup>
<apex:panelGroup >
<apex:selectList size="6" value="{!rfields}" multiselect="true" style="width:200px;hieght:150px;">
<apex:selectOptions value="{!fsoption}"></apex:selectOptions>
</apex:selectList>
</apex:panelGroup>
</apex:panelGrid>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
<apex:pageBlockSectionItem >
<apex:pageBlockTable value="{!mydata}" var="a" >
<apex:repeat value="{!myfields}" var="b">
<apex:column value="{!a[b]}"/>
</apex:repeat>
</apex:pageBlockTable>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
<br/>
<br/>
<br/>
<apex:commandButton value="click" action="{!querymydeta}" reRender="op"/>{!query}
</apex:pageBlock>
</apex:form>
</apex:page>
vf page:
<apex:page controller="dynamic1" >
<apex:form id="op">
<apex:pageBlock >
<apex:pageBlockSection id="od1" columns="1">
<apex:pageBlockSection >
<apex:pageBlockSectionItem >
<apex:outputLabel value="Object List"></apex:outputLabel>
<apex:selectList size="1" value="{!selectedobj}">
<apex:selectOptions value="{!objects}" ></apex:selectOptions>
<apex:actionSupport action="{!details}" event="onchange" rerender="op"/>
</apex:selectList>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
<br/>
<br/>
<br/>
<apex:pageBlockSection >
<apex:pageBlockSectionItem >
<apex:outputLabel value="fields List:"></apex:outputLabel>
<apex:panelGrid columns="3" id="od" >
<apex:panelGroup style="width:40%" >
<apex:selectList size="6" value="{!sfields}" multiselect="true" style="width:200px;hieght:150px;">
<apex:selectOptions value="{!fnoption}"></apex:selectOptions>
</apex:selectList>
</apex:panelGroup>
<apex:panelGroup style="width:20%;hieght:120px;">
<table hieght="120px">
<tr><td><apex:commandButton value="Add" action="{!addfields}" style="width:80px;" reRender="od" /> </td></tr>
<tr><td><apex:commandButton value="Remove" action="{!removefields}" style="width:80px;" reRender="od1" /> </td></tr>
</table>
</apex:panelGroup>
<apex:panelGroup >
<apex:selectList size="6" value="{!rfields}" multiselect="true" style="width:200px;hieght:150px;">
<apex:selectOptions value="{!fsoption}"></apex:selectOptions>
</apex:selectList>
</apex:panelGroup>
</apex:panelGrid>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
<apex:pageBlockSectionItem >
<apex:pageBlockTable value="{!mydata}" var="a" >
<apex:repeat value="{!myfields}" var="b">
<apex:column value="{!a[b]}"/>
</apex:repeat>
</apex:pageBlockTable>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
<br/>
<br/>
<br/>
<apex:commandButton value="click" action="{!querymydeta}" reRender="op"/>{!query}
</apex:pageBlock>
</apex:form>
</apex:page>
controller:
<apex:page controller="dynamic1" >
<apex:form id="op">
<apex:pageBlock >
<apex:pageBlockSection id="od1" columns="1">
<apex:pageBlockSection >
<apex:pageBlockSectionItem >
<apex:outputLabel value="Object List"></apex:outputLabel>
<apex:selectList size="1" value="{!selectedobj}">
<apex:selectOptions value="{!objects}" ></apex:selectOptions>
<apex:actionSupport action="{!details}" event="onchange" rerender="op"/>
</apex:selectList>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
<br/>
<br/>
<br/>
<apex:pageBlockSection >
<apex:pageBlockSectionItem >
<apex:outputLabel value="fields List:"></apex:outputLabel>
<apex:panelGrid columns="3" id="od" >
<apex:panelGroup style="width:40%" >
<apex:selectList size="6" value="{!sfields}" multiselect="true" style="width:200px;hieght:150px;">
<apex:selectOptions value="{!fnoption}"></apex:selectOptions>
</apex:selectList>
</apex:panelGroup>
<apex:panelGroup style="width:20%;hieght:120px;">
<table hieght="120px">
<tr><td><apex:commandButton value="Add" action="{!addfields}" style="width:80px;" reRender="od" /> </td></tr>
<tr><td><apex:commandButton value="Remove" action="{!removefields}" style="width:80px;" reRender="od1" /> </td></tr>
</table>
</apex:panelGroup>
<apex:panelGroup >
<apex:selectList size="6" value="{!rfields}" multiselect="true" style="width:200px;hieght:150px;">
<apex:selectOptions value="{!fsoption}"></apex:selectOptions>
</apex:selectList>
</apex:panelGroup>
</apex:panelGrid>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
<apex:pageBlockSectionItem >
<apex:pageBlockTable value="{!mydata}" var="a" >
<apex:repeat value="{!myfields}" var="b">
<apex:column value="{!a[b]}"/>
</apex:repeat>
</apex:pageBlockTable>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
<br/>
<br/>
<br/>
<apex:commandButton value="click" action="{!querymydeta}" reRender="op"/>{!query}
</apex:pageBlock>
</apex:form>
</apex:page>